Ever since linux-headers 2.6 started installing a reduced subset of the kernel headers, most all networking apps won't compile, including ebtables, arptables, and now iproute2. Reproducible: Always Steps to Reproduce: /etc/make.profile: symbolic link to `/usr/portage/profiles/uclibc/x86/hardened/' * installed packages [I--] [M~] sys-kernel/linux-headers-2.6.19 (0) 1.emerge -av iproute2 Actual Results: i686-gentoo-linux-uclibc-gcc -D_GNU_SOURCE -march=athlon -Os -fomit-frame-pointer -pipe -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -c -o ipaddress.o ipaddress.c i686-gentoo-linux-uclibc-gcc -D_GNU_SOURCE -march=athlon -Os -fomit-frame-pointer -pipe -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -c -o iproute.o iproute.c ipaddress.c: In function `print_link_flags': ipaddress.c:99: error: `IFF_DYNAMIC' undeclared (first use in this function) ipaddress.c:99: error: (Each undeclared identifier is reported only once ipaddress.c:99: error: for each function it appears in.) make[1]: *** [ipaddress.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/sys-apps/iproute2-2.6.19.20061214/work/iproute2-2.6.19-061214/ip' make: *** [all] Error 2 Expected Results: should emerge successfully Portage 2.1.2_rc4-r6 (uclibc/x86/hardened, gcc-3.4.6-vanilla, uclibc-0.9.28-r1, 2.6.19-gentoo-r1 x86_64) ================================================================= System uname: 2.6.19-gentoo-r1 x86_64 unknown Gentoo Base System version 1.12.8 Last Sync: Wed, 17 Jan 2007 00:50:01 +0000 dev-lang/python: 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.19 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-gentoo-linux-uclibc" CFLAGS="-march=athlon -Os -fomit-frame-pointer -pipe" CHOST="i686-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon -Os -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/packages/uclibc" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="bitmap-fonts cli cracklib dlloader dri hardened minimal multiuser ncurses pcre pic readline reflection session spl truetype-fonts type1-fonts uclibc x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
this is closely related to bug #160371, but can't be blamed on glibc :)
2.6.19 is out of date *** This bug has been marked as a duplicate of bug 150855 ***
Created attachment 107506 [details, diff] provides fallback definition for IFF_DYNAMIC
Updated linux-headers and uclibc, same problem. Portage 2.1.2-r1 (uclibc/x86/hardened, gcc-3.4.6-vanilla, uclibc-0.9.28-r2, 2.6.19-gentoo-r1 x86_64) ================================================================= System uname: 2.6.19-gentoo-r1 x86_64 unknown Gentoo Base System version 1.12.9 Timestamp of tree: Sat, 20 Jan 2007 05:50:01 +0000 dev-lang/python: 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.19.2-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-gentoo-linux-uclibc" CFLAGS="-march=athlon -Os -fomit-frame-pointer -pipe" CHOST="i686-gentoo-linux-uclibc" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon -Os -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/packages/uclibc" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="bitmap-fonts cli cracklib dlloader dri hardened minimal multiuser ncurses pcre pic readline reflection session spl truetype-fonts type1-fonts uclibc x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 107507 [details, diff] patch for disabling ipv6, should be controlled via use flag
Created attachment 107510 [details] proposed updated ebuild Applies IFF_DYNAMIC patch always Applies disable ipv6 patch when ipv6 USE flag is not set Places ipv6 in iproute2 uses list
Also, I don't see anything this bug has in common with 150855. That bug is for net-tools, this is for iproute2. That bug failed to find a header file, this one is missing a #define gotten from a completely different header.
*** Bug 160371 has been marked as a duplicate of this bug. ***
none of the patches you've posted are correct
I'd be happy to "correct" them in any way that makes you happier and still fixes the problem. iproute2 needs to emerge on a uclibc system with USE=-ipv6, and currently doesn't without these patches.
Thanks Richard, your patches helped me to compile iproute2, they should fast be reviewed and then applied into the rep
Thanks Richard. Your patches helped me as well to compile iproute2 on a hardened system.
I just had the same problem and I fixed it by downgrading my headers to sys-kernel/linux-headers-2.6.17-r2 I guess I should have learned my lesson with net-tools as using any version of linux-headers > sys-kernel/linux-headers-2.6.17-r2 will not let me compile net tools also.
latest net-tools builds fine with sanitized headers and updated libc
(In reply to comment #14) > latest net-tools builds fine with sanitized headers and updated libc > I guess my problem is I am using sys-libs/glibc-2.3.6-r5
the ipv6 use flag + patch is useful on a i386-gentoo-linux-uclibc system that has no ipv6 support. would it hurt anyone to include it?
please disregard comment #16. the ipv6 patch is broken.
Created attachment 113156 [details, diff] Maybe correct handling of #ifdef IFF_DYNAMIC I googled how this was being handled in other dist. Works for me, but ymmv.
*** Bug 176922 has been marked as a duplicate of this bug. ***
This is now fixed (at least for hardened), as glibc-2.5-r2 is unmasked.
*** Bug 181286 has been marked as a duplicate of this bug. ***
still a problem for uclibc
I guess this should be fixed in uclibc. http://sources.redhat.com/ml/libc-alpha/2006-02/msg00089.html
(In reply to comment #23) > I guess this should be fixed in uclibc. > This is fixed in uclibc-0.9.29 (bump bug: #182094)
still a problem in latest stable iproute2 on hardened amd64. There isn't even an ipv6 use flag.
there is no problem on hardened stable amd64 anymore ... if you have a problem, your system is out of date
(In reply to comment #26) > there is no problem on hardened stable amd64 anymore ... if you have a problem, > your system is out of date On my system, update world failed because iproute2 was emerged before glibc. Perhaps we should give iproute2 a compile-time dependency on >=sys-libs/glibc-2.5 ?
> On my system, update world failed because iproute2 was emerged before glibc. > Perhaps we should give iproute2 a compile-time dependency on > >=sys-libs/glibc-2.5 ? This won't work, because some people use an alternate C runtime library, like uclibc
all C libraries should be up-to-date now