Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #57869 > unrolled thread

<linux/if.h> and <net/if.h> conflict needs to be resolved for backports?

Started byHarald Dunkel <harald.dunkel@aixigo.de>
First post2017-06-01 10:50 +0200
Last post2017-06-05 11:50 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.debian.kernel


Contents

  <linux/if.h> and <net/if.h> conflict needs to be resolved for  backports? Harald Dunkel <harald.dunkel@aixigo.de> - 2017-06-01 10:50 +0200
    Re: <linux/if.h> and <net/if.h> conflict needs to be resolved for  backports? Ben Hutchings <ben@decadent.org.uk> - 2017-06-02 11:20 +0200
      Re: <linux/if.h> and <net/if.h> conflict needs to be resolved for  backports? Harald Dunkel <harald.dunkel@aixigo.de> - 2017-06-03 08:10 +0200
        Re: <linux/if.h> and <net/if.h> conflict needs to be resolved for  backports? Ben Hutchings <ben@decadent.org.uk> - 2017-06-03 16:10 +0200
          Re: <linux/if.h> and <net/if.h> conflict needs to be resolved for  backports? Harald Dunkel <harald.dunkel@aixigo.de> - 2017-06-05 11:50 +0200

#57869 — <linux/if.h> and <net/if.h> conflict needs to be resolved for backports?

FromHarald Dunkel <harald.dunkel@aixigo.de>
Date2017-06-01 10:50 +0200
Subject<linux/if.h> and <net/if.h> conflict needs to be resolved for backports?
Message-ID<tNtXQ-fI-21@gated-at.bofh.it>
Hi folks,

wrt #822396:

Using the 4.9.25 backports linux-libc-dev for Jessie I still get
the conflict between linux/if.h and net/if.h, e.g. on building
strongswan 5.5.3 (see below).

Workaround is to avoid the backports package, but I wonder if it would
be possible to fix this? How comes that the fix for #822396 doesn't
work for Jessie?


Regards
Harri
--------------------------------------------------------------------------
:
:
make[6]: Entering directory '/build/strongswan-5.5.3/src/libcharon/plugins/socket_default'
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src/include -I../../../../src/libstrongswan -I../../../../src/libcharon -D_FORTIFY_SOURCE=2 -rdynamic -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -c -o socket_default_socket.lo socket_default_socket.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/include -I../../../../src/libstrongswan -I../../../../src/libcharon -D_FORTIFY_SOURCE=2 -rdynamic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -c socket_default_socket.c  -fPIC -DPIC -o .libs/socket_default_socket.o
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src/include -I../../../../src/libstrongswan -I../../../../src/libcharon -D_FORTIFY_SOURCE=2 -rdynamic -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -c -o socket_default_plugin.lo socket_default_plugin.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/include -I../../../../src/libstrongswan -I../../../../src/libcharon -D_FORTIFY_SOURCE=2 -rdynamic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -c socket_default_plugin.c  -fPIC -DPIC -o .libs/socket_default_plugin.o
/bin/bash ../../../../libtool  --tag=CC   --mode=link gcc -rdynamic -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -module -avoid-version -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-O1 -o libstrongswan-socket-default.la -rpath /usr/lib/ipsec/plugins socket_default_socket.lo socket_default_plugin.lo
libtool: link: gcc -shared  -fPIC -DPIC  .libs/socket_default_socket.o .libs/socket_default_plugin.o    -O2 -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -Wl,-O1   -Wl,-soname -Wl,libstrongswan-socket-default.so -o .libs/libstrongswan-socket-default.so
libtool: link: ( cd ".libs" && rm -f "libstrongswan-socket-default.la" && ln -s "../libstrongswan-socket-default.la" "libstrongswan-socket-default.la" )
make[6]: Leaving directory '/build/strongswan-5.5.3/src/libcharon/plugins/socket_default'
Making all in plugins/connmark
make[6]: Entering directory '/build/strongswan-5.5.3/src/libcharon/plugins/connmark'
/bin/bash ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src/libstrongswan -I../../../../src/libcharon -D_FORTIFY_SOURCE=2 -rdynamic  -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -c -o connmark_listener.lo connmark_listener.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/libstrongswan -I../../../../src/libcharon -D_FORTIFY_SOURCE=2 -rdynamic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -include /build/strongswan-5.5.3/config.h -c connmark_listener.c  -fPIC -DPIC -o .libs/connmark_listener.o
In file included from /usr/include/libiptc/ipt_kernel_headers.h:14:0,
                 from /usr/include/libiptc/libiptc.h:6,
                 from connmark_listener.c:24:
/usr/include/linux/if.h:79:2: error: redeclaration of enumerator 'IFF_UP'
  IFF_UP    = 1<<0,  /* sysfs */
  ^
/usr/include/net/if.h:44:5: note: previous definition of 'IFF_UP' was here
     IFF_UP = 0x1,  /* Interface is up.  */
     ^
/usr/include/linux/if.h:80:2: error: redeclaration of enumerator 'IFF_BROADCAST'
  IFF_BROADCAST   = 1<<1,  /* __volatile__ */
  ^
/usr/include/net/if.h:46:5: note: previous definition of 'IFF_BROADCAST' was here
     IFF_BROADCAST = 0x2, /* Broadcast address valid.  */
     ^
/usr/include/linux/if.h:81:2: error: redeclaration of enumerator 'IFF_DEBUG'
  IFF_DEBUG   = 1<<2,  /* sysfs */
  ^
/usr/include/net/if.h:48:5: note: previous definition of 'IFF_DEBUG' was here
     IFF_DEBUG = 0x4,  /* Turn on debugging.  */
     ^
/usr/include/linux/if.h:82:2: error: redeclaration of enumerator 'IFF_LOOPBACK'
  IFF_LOOPBACK   = 1<<3,  /* __volatile__ */
  ^
/usr/include/net/if.h:50:5: note: previous definition of 'IFF_LOOPBACK' was here
     IFF_LOOPBACK = 0x8,  /* Is a loopback net.  */
     ^
/usr/include/linux/if.h:83:2: error: redeclaration of enumerator 'IFF_POINTOPOINT'
  IFF_POINTOPOINT   = 1<<4,  /* __volatile__ */
  ^
/usr/include/net/if.h:52:5: note: previous definition of 'IFF_POINTOPOINT' was here
     IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link.  */
     ^
/usr/include/linux/if.h:84:2: error: redeclaration of enumerator 'IFF_NOTRAILERS'
  IFF_NOTRAILERS   = 1<<5,  /* sysfs */
  ^
/usr/include/net/if.h:54:5: note: previous definition of 'IFF_NOTRAILERS' was here
     IFF_NOTRAILERS = 0x20, /* Avoid use of trailers.  */
     ^
/usr/include/linux/if.h:85:2: error: redeclaration of enumerator 'IFF_RUNNING'
  IFF_RUNNING   = 1<<6,  /* __volatile__ */
  ^
/usr/include/net/if.h:56:5: note: previous definition of 'IFF_RUNNING' was here
     IFF_RUNNING = 0x40,  /* Resources allocated.  */
     ^
/usr/include/linux/if.h:86:2: error: redeclaration of enumerator 'IFF_NOARP'
  IFF_NOARP   = 1<<7,  /* sysfs */
  ^
/usr/include/net/if.h:58:5: note: previous definition of 'IFF_NOARP' was here
     IFF_NOARP = 0x80,  /* No address resolution protocol.  */
     ^
/usr/include/linux/if.h:87:2: error: redeclaration of enumerator 'IFF_PROMISC'
  IFF_PROMISC   = 1<<8,  /* sysfs */
  ^
/usr/include/net/if.h:60:5: note: previous definition of 'IFF_PROMISC' was here
     IFF_PROMISC = 0x100, /* Receive all packets.  */
     ^
/usr/include/linux/if.h:88:2: error: redeclaration of enumerator 'IFF_ALLMULTI'
  IFF_ALLMULTI   = 1<<9,  /* sysfs */
  ^
/usr/include/net/if.h:64:5: note: previous definition of 'IFF_ALLMULTI' was here
     IFF_ALLMULTI = 0x200, /* Receive all multicast packets.  */
     ^
/usr/include/linux/if.h:89:2: error: redeclaration of enumerator 'IFF_MASTER'
  IFF_MASTER   = 1<<10, /* __volatile__ */
  ^
/usr/include/net/if.h:67:5: note: previous definition of 'IFF_MASTER' was here
     IFF_MASTER = 0x400,  /* Master of a load balancer.  */
     ^
/usr/include/linux/if.h:90:2: error: redeclaration of enumerator 'IFF_SLAVE'
  IFF_SLAVE   = 1<<11, /* __volatile__ */
  ^
/usr/include/net/if.h:69:5: note: previous definition of 'IFF_SLAVE' was here
     IFF_SLAVE = 0x800,  /* Slave of a load balancer.  */
     ^
/usr/include/linux/if.h:91:2: error: redeclaration of enumerator 'IFF_MULTICAST'
  IFF_MULTICAST   = 1<<12, /* sysfs */
  ^
/usr/include/net/if.h:72:5: note: previous definition of 'IFF_MULTICAST' was here
     IFF_MULTICAST = 0x1000, /* Supports multicast.  */
     ^
/usr/include/linux/if.h:92:2: error: redeclaration of enumerator 'IFF_PORTSEL'
  IFF_PORTSEL   = 1<<13, /* sysfs */
  ^
/usr/include/net/if.h:75:5: note: previous definition of 'IFF_PORTSEL' was here
     IFF_PORTSEL = 0x2000, /* Can set media type.  */
     ^
/usr/include/linux/if.h:93:2: error: redeclaration of enumerator 'IFF_AUTOMEDIA'
  IFF_AUTOMEDIA   = 1<<14, /* sysfs */
  ^
/usr/include/net/if.h:77:5: note: previous definition of 'IFF_AUTOMEDIA' was here
     IFF_AUTOMEDIA = 0x4000, /* Auto media select active.  */
     ^
/usr/include/linux/if.h:94:2: error: redeclaration of enumerator 'IFF_DYNAMIC'
  IFF_DYNAMIC   = 1<<15, /* sysfs */
  ^
/usr/include/net/if.h:79:5: note: previous definition of 'IFF_DYNAMIC' was here
     IFF_DYNAMIC = 0x8000 /* Dialup device with changing addresses.  */
     ^
In file included from /usr/include/linux/netfilter_ipv4/ip_tables.h:20:0,
                 from /usr/include/libiptc/libiptc.h:12,
                 from connmark_listener.c:24:
/usr/include/linux/if.h:189:8: error: redefinition of 'struct ifmap'
 struct ifmap {
        ^
In file included from /usr/include/libiptc/ipt_kernel_headers.h:14:0,
                 from /usr/include/libiptc/libiptc.h:6,
                 from connmark_listener.c:24:
/usr/include/net/if.h:111:8: note: originally defined here
 struct ifmap
        ^
In file included from /usr/include/linux/netfilter_ipv4/ip_tables.h:20:0,
                 from /usr/include/libiptc/libiptc.h:12,
                 from connmark_listener.c:24:
/usr/include/linux/if.h:226:8: error: redefinition of 'struct ifreq'
 struct ifreq {
        ^
In file included from /usr/include/libiptc/ipt_kernel_headers.h:14:0,
                 from /usr/include/libiptc/libiptc.h:6,
                 from connmark_listener.c:24:
/usr/include/net/if.h:126:8: note: originally defined here
 struct ifreq
        ^
In file included from /usr/include/linux/netfilter_ipv4/ip_tables.h:20:0,
                 from /usr/include/libiptc/libiptc.h:12,
                 from connmark_listener.c:24:
/usr/include/linux/if.h:278:8: error: redefinition of 'struct ifconf'
 struct ifconf  {
        ^
In file included from /usr/include/libiptc/ipt_kernel_headers.h:14:0,
                 from /usr/include/libiptc/libiptc.h:6,
                 from connmark_listener.c:24:
/usr/include/net/if.h:176:8: note: originally defined here
 struct ifconf
        ^
Makefile:568: recipe for target 'connmark_listener.lo' failed
make[6]: *** [connmark_listener.lo] Error 1
make[6]: Leaving directory '/build/strongswan-5.5.3/src/libcharon/plugins/connmark'
Makefile:1944: recipe for target 'all-recursive' failed
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory '/build/strongswan-5.5.3/src/libcharon'
Makefile:1236: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/build/strongswan-5.5.3/src/libcharon'
Makefile:508: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/build/strongswan-5.5.3/src'
Makefile:571: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/build/strongswan-5.5.3'
Makefile:479: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/build/strongswan-5.5.3'
dh_auto_build: make -j1 returned exit code 2
debian/rules:234: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

[toc] | [next] | [standalone]


#57878

FromBen Hutchings <ben@decadent.org.uk>
Date2017-06-02 11:20 +0200
Message-ID<tNQUq-7vd-17@gated-at.bofh.it>
In reply to#57869

[Multipart message — attachments visible in raw view] — view raw

On Thu, 2017-06-01 at 10:37 +0200, Harald Dunkel wrote:
> Hi folks,
> 
> wrt #822396:
> 
> Using the 4.9.25 backports linux-libc-dev for Jessie I still get
> the conflict between linux/if.h and net/if.h, e.g. on building
> strongswan 5.5.3 (see below).
> 
> Workaround is to avoid the backports package, but I wonder if it would
> be possible to fix this? How comes that the fix for #822396 doesn't
> work for Jessie?

I think it depends on changes to the glibc headers.

Ben.

-- 
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow
Lindberg

[toc] | [prev] | [next] | [standalone]


#57880

FromHarald Dunkel <harald.dunkel@aixigo.de>
Date2017-06-03 08:10 +0200
Message-ID<tOaq5-3mk-9@gated-at.bofh.it>
In reply to#57878
On 06/02/17 11:16, Ben Hutchings wrote:
> On Thu, 2017-06-01 at 10:37 +0200, Harald Dunkel wrote:
>>
>> Workaround is to avoid the backports package, but I wonder if it would
>> be possible to fix this? How comes that the fix for #822396 doesn't
>> work for Jessie?
> 
> I think it depends on changes to the glibc headers.
> 

<rhetorical>
Shouldn't debian/control mention this dependency?
</rhetorical>

Of course I understand that there is no backport of glibc. AFAICS
the conflict in Jessie has been introduced by the backports kernel,
ignoring old glibc. This is even more painful, since 4.9.x is
supposed to be a LTS kernel.

IMU <linux/if.h> should either look at the glibc version number,
or avoid the double definitions using "#ifndef".

What would you suggest?


Regards
Harri

[toc] | [prev] | [next] | [standalone]


#57881

FromBen Hutchings <ben@decadent.org.uk>
Date2017-06-03 16:10 +0200
Message-ID<tOhUB-81i-15@gated-at.bofh.it>
In reply to#57880

[Multipart message — attachments visible in raw view] — view raw

On Sat, 2017-06-03 at 08:08 +0200, Harald Dunkel wrote:
> On 06/02/17 11:16, Ben Hutchings wrote:
> > On Thu, 2017-06-01 at 10:37 +0200, Harald Dunkel wrote:
> > > 
> > > Workaround is to avoid the backports package, but I wonder if it
> > > would
> > > be possible to fix this? How comes that the fix for #822396
> > > doesn't
> > > work for Jessie?
> > 
> > I think it depends on changes to the glibc headers.
> > 
> 
> <rhetorical>
> Shouldn't debian/control mention this dependency?
> </rhetorical>
>
> Of course I understand that there is no backport of glibc. AFAICS
> the conflict in Jessie has been introduced by the backports kernel,
> ignoring old glibc. This is even more painful, since 4.9.x is
> supposed to be a LTS kernel.
> 
> IMU <linux/if.h> should either look at the glibc version number,
> or avoid the double definitions using "#ifndef".
> 
> What would you suggest?

I would suggest not using linux-libc-dev from jessie-backports.

Ben.

-- 
Ben Hutchings
Experience is directly proportional to the value of equipment
destroyed.
                                                    - Carolyn Scheppner

[toc] | [prev] | [next] | [standalone]


#57926

FromHarald Dunkel <harald.dunkel@aixigo.de>
Date2017-06-05 11:50 +0200
Message-ID<tOWO5-1cd-3@gated-at.bofh.it>
In reply to#57881
On 06/03/17 15:59, Ben Hutchings wrote:
> On Sat, 2017-06-03 at 08:08 +0200, Harald Dunkel wrote:
>>
>> What would you suggest?
> 
> I would suggest not using linux-libc-dev from jessie-backports.
> 

This workaround is already known; see my first post in this
thread.

Regards
Harri

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web