Mike, this is the error on x86: gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -fomit-frame-pointer -ftracer -fstack-protector -Wstrict-prototypes -Wall -g -I../include -include ../include-glibc/glibc-bugs.h -I/usr/include -DRESOLVE_HOSTNAMES -c -o ll_proto.o ll_proto.c In file included from ll_types.c:23: /usr/include/netinet/in.h:262: error: syntax error before '(' token /usr/include/netinet/in.h:262: error: syntax error before "__u32" /usr/include/netinet/in.h:263: error: syntax error before '(' token /usr/include/netinet/in.h:263: error: syntax error before "__u16" /usr/include/netinet/in.h:265: error: syntax error before '(' token /usr/include/netinet/in.h:265: error: syntax error before "__u32" /usr/include/netinet/in.h:267: error: syntax error before '(' token /usr/include/netinet/in.h:267: error: syntax error before "__u16" In file included from ll_proto.c:23: /usr/include/netinet/in.h:262: error: syntax error before '(' token /usr/include/netinet/in.h:262: error: syntax error before "__u32" /usr/include/netinet/in.h:263: error: syntax error before '(' token /usr/include/netinet/in.h:263: error: syntax error before "__u16" /usr/include/netinet/in.h:265: error: syntax error before '(' token /usr/include/netinet/in.h:265: error: syntax error before "__u32" /usr/include/netinet/in.h:267: error: syntax error before '(' token /usr/include/netinet/in.h:267: error: syntax error before "__u16" make[1]: *** [ll_types.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [ll_proto.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/iproute-20010824-r5/work/iproute2/lib' make: *** [all] Error 2 And this is the error on sparc64: gcc -D_GNU_SOURCE -O2 -mcpu=ultrasparc -pipe -fomit-frame-pointer -fstack-protector -ftracer -Wstrict-prototypes -Wall -g -I../include -include ../include-glibc/glibc-bugs.h -I/usr/include -DRESOLVE_HOSTNAMES -c -o q_hfsc.o q_hfsc.c q_hfsc.c:27: warning: `struct tc_service_curve' declared inside parameter list q_hfsc.c:27: warning: its scope is only this definition or declaration, which is probably not what you want q_hfsc.c: In function `hfsc_parse_opt': q_hfsc.c:72: error: storage size of `qopt' isn't known q_hfsc.c:72: warning: unused variable `qopt' q_hfsc.c: In function `hfsc_print_opt': q_hfsc.c:109: error: dereferencing pointer to incomplete type q_hfsc.c:113: error: dereferencing pointer to incomplete type q_hfsc.c:114: error: dereferencing pointer to incomplete type q_hfsc.c: In function `hfsc_print_xstats': q_hfsc.c:126: error: dereferencing pointer to incomplete type q_hfsc.c:130: error: dereferencing pointer to incomplete type q_hfsc.c:131: error: dereferencing pointer to incomplete type q_hfsc.c:132: error: dereferencing pointer to incomplete type q_hfsc.c:133: error: dereferencing pointer to incomplete type q_hfsc.c:134: error: dereferencing pointer to incomplete type q_hfsc.c:135: error: dereferencing pointer to incomplete type q_hfsc.c: In function `hfsc_parse_class_opt': q_hfsc.c:145: error: storage size of `rsc' isn't known q_hfsc.c:145: error: storage size of `fsc' isn't known q_hfsc.c:145: error: storage size of `usc' isn't known q_hfsc.c:203: error: `TCA_HFSC_RSC' undeclared (first use in this function) q_hfsc.c:203: error: (Each undeclared identifier is reported only once q_hfsc.c:203: error: for each function it appears in.) q_hfsc.c:205: error: `TCA_HFSC_FSC' undeclared (first use in this function) q_hfsc.c:207: error: `TCA_HFSC_USC' undeclared (first use in this function) q_hfsc.c:145: warning: unused variable `rsc' q_hfsc.c:145: warning: unused variable `fsc' q_hfsc.c:145: warning: unused variable `usc' q_hfsc.c: At top level: q_hfsc.c:214: warning: `struct tc_service_curve' declared inside parameter list q_hfsc.c: In function `hfsc_print_sc': q_hfsc.c:219: error: dereferencing pointer to incomplete type q_hfsc.c:220: error: dereferencing pointer to incomplete type q_hfsc.c:221: error: dereferencing pointer to incomplete type q_hfsc.c: In function `hfsc_print_class_opt': q_hfsc.c:227: error: `TCA_HFSC_MAX' undeclared (first use in this function) q_hfsc.c:236: error: `TCA_HFSC_RSC' undeclared (first use in this function) q_hfsc.c:237: error: dereferencing pointer to incomplete type q_hfsc.c:242: error: `TCA_HFSC_FSC' undeclared (first use in this function) q_hfsc.c:243: error: dereferencing pointer to incomplete type q_hfsc.c:248: error: `TCA_HFSC_USC' undeclared (first use in this function) q_hfsc.c:249: error: dereferencing pointer to incomplete type q_hfsc.c:256: warning: passing arg 3 of `hfsc_print_sc' from incompatible pointer type q_hfsc.c:258: warning: passing arg 3 of `hfsc_print_sc' from incompatible pointer type q_hfsc.c:260: warning: passing arg 3 of `hfsc_print_sc' from incompatible pointer type q_hfsc.c:227: warning: unused variable `tb' q_hfsc.c: At top level: q_hfsc.c:276: warning: `struct tc_service_curve' declared inside parameter list q_hfsc.c: In function `hfsc_get_sc1': q_hfsc.c:309: error: dereferencing pointer to incomplete type q_hfsc.c:310: error: dereferencing pointer to incomplete type q_hfsc.c:311: error: dereferencing pointer to incomplete type q_hfsc.c: At top level: q_hfsc.c:319: warning: `struct tc_service_curve' declared inside parameter list q_hfsc.c: In function `hfsc_get_sc2': q_hfsc.c:362: error: dereferencing pointer to incomplete type q_hfsc.c:363: error: dereferencing pointer to incomplete type q_hfsc.c:364: error: dereferencing pointer to incomplete type q_hfsc.c:370: error: dereferencing pointer to incomplete type q_hfsc.c:371: error: dereferencing pointer to incomplete type q_hfsc.c:372: error: dereferencing pointer to incomplete type q_hfsc.c: At top level: q_hfsc.c:381: warning: `struct tc_service_curve' declared inside parameter list q_hfsc.c:382: error: conflicting types for `hfsc_get_sc' q_hfsc.c:27: error: previous declaration of `hfsc_get_sc' q_hfsc.c: In function `hfsc_get_sc': q_hfsc.c:383: warning: passing arg 3 of `hfsc_get_sc1' from incompatible pointer type q_hfsc.c:384: warning: passing arg 3 of `hfsc_get_sc2' from incompatible pointer type q_hfsc.c:387: error: dereferencing pointer to incomplete type q_hfsc.c:387: error: dereferencing pointer to incomplete type make[1]: *** [q_hfsc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/iproute-20010824-r5/work/iproute2/tc' make: *** [all] Error 2 !!! ERROR: sys-apps/iproute-20010824-r5 failed. The emerge infos are: root sephora # emerge info /usr/portage/sys-apps/iproute Portage 2.0.50-r3 (2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.4.25-pre7-gss-evms2) ================================================================= System uname: 2.4.25-pre7-gss-evms2 i686 AMD Athlon(tm) XP 2100+ Gentoo Base System version 1.4.3.13p1 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ftracer -fstack-protector" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ftracer -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache cvs digest fixpackages noinfo sandbox" GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://gentoo.ccccom.com" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="cvs://seemant@cvs.gentoo.org:/home/cvsroot" USE="3dnow X apm avi crypt cscope dvd encode faad fam foomaticdb gdbm gif gtk gtk2 imagemagick imlib ipv6 jpeg lcd libg++ libwww mad md5sum mikmod mmx mng motif moznocompose moznoirc moznomail mpeg music nas ncurses nogcj nptl offensive ofx oggvorbis openal opengl oss pam pdflib png postgres python qt quicktime readline sasl sdl slang spell sse ssl svga tcpd tiff truetype video_cards_radeon videos wmf x86 xface xml xml2 xmms xosd xv xvid zlib" and: construct root # emerge info Portage 2.0.50-r3 (default-sparc64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.4.25-sparc) ================================================================= System uname: 2.4.25-sparc sparc64 sun4u Gentoo Base System version 1.4.3.13p1 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="sparc ~sparc" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=ultrasparc -pipe -fomit-frame-pointer -fstack-protector -ftracer" CHOST="sparc-unknown-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=ultrasparc -pipe -fomit-frame-pointer -fstack-protector -ftracer" DISTDIR="/usr/portage/distfiles" FEATURES="nodoc noinfo noman sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://dreams/portage" USE="avi berkdb crypt cups encode esd fbcon foomaticdb gdbm gif hardened imlib jpeg libwww mad mikmod mpeg ncurses oggvorbis opengl pam pdflib perl png python readline sdl slang sparc spell ssl tcpd truetype xml2 xmms xv zlib"
sparc's been fixed x86 headers: [13:38] <seemant> [ebuild R ] sys-kernel/linux-headers-2.4.22
ok, here's the dealie when iproute is built with optimizations, linux/byteorder/ files are pulled in (via linux/netdevice.h and linux/if_arp.h and such) which define ntohl and such functions as crazy asm inlined things then when netinet/in.h is pulled in, it's define for ntohl is basically replaced with inline crap ... ive added this little hack to the ebuild for the lack of a better solution: if has_version '<sys-kernel/linux-headers-2.6' ; then echo '#define __constant_htons(x) htons(x)' >> include-glibc/glibc-bugs.h append-flags -D_LINUX_BYTEORDER_LITTLE_ENDIAN_H -D_LINUX_BYTEORDER_BIG_ENDIAN_H fi these basically prevent the linux/byteorder/ files from being included i'd love to hear a cleaner solution if someone has one ;) no opts: extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__const__)) optimizations: extern uint32_t (__builtin_constant_p((__u32)((uint32_t __netlong))) ? ({ __u32 __x = (((uint32_t __ne tlong))); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL ) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )) ; }) : __fswab32(((uint32_t __netlong)))) __attribute__ ((__const__));
seemant said it worked for him, so unless someone has a good fix, i'm just going to roll with this one