I am developing a set of kernel headers against the 2.6 kernel source (test2-mm1) for inclusion into /usr/include. I think I understand the caveats and warnings in doing so; I am building a new system with a new glibc etc. etc... Some packages insist upon looking at includes in /usr/src/linux. sash is one; I can fix that one. Another is iputils, which I cannot fix. I recall that iputils from CVS can build against kernel 2.6? I cannot find such anywhere at the moment; ftp for iputils is sometimes difficult to reach. If I understand correctly, we need iputils for an IPv6-compliant ping. Perhaps there is a better alternative? I will try to dig up a fix for this...
i just tried building iputils against the headers (-test2) and looks like if you were to just fix the 2.6 kernel headers it would prob compile
Thanks for checking this, Bret... Yes, I can manually tweak it, and I spent a bit of time creating a patch and a new ebuild (as I have done for some other packages), but in this case I was not successful: iputils insists on looking at the /usr/src/linux/include area, which is bad, bad, bad... I will try again.
/usr/src/linux you say? well grep shows Makefile:KERNEL_INCLUDE=/usr/src/linux/include Modules/Makefile:KERNEL_INCLUDE=/usr/src/linux/include Modules/pg3.c: * compile-command: "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -c pg3.c" the third file looks to be just a comment im willing to help out more if you are doing more 2.6 kernel header fix up's im on freenode as Magnade if you want to talk via irc
i tried a _try version of some sort that was on the ftp for iputils and got a bit farther fixed some more headers but didnt really get it to finish compiling :\
Well, I cannot remember what I did to get it to compile. Brains running out my ears now... I cannot connect to the FTP site to get a more-recent version of this package source.
This isn't just limited to 2.6.0 headers, but 2.4.22 headers as well. And it isn't tied to x86 architecture either. I have confirmed iputils breaks on both sparc64 and mips architectures using 2.4.22 headers, and x86 using latest 2.6.0-test4 headers (prototype ebuilds that I have not committed to CVS). I have also tried the iputils-ss021109-try package on the FTP site, which does indeed build against such headers, however ping is broken. I;ve tried patching the iputils-ss020927's include-glibc/ folder with the include-glibc/ folder from iputils-ss021109-try, and ping also breaks (but it compiles). Below are some of my results. --- sparc64 && mips (2.4.22 headers) --- >>> md5 src_uri ;-) iputils-ss020927.tar.gz >>> Unpacking source... >>> Unpacking iputils-ss020927.tar.gz to /var/tmp/portage/iputils-020927/work >>> Source unpacked. gcc -D_GNU_SOURCE -mcpu=ultrasparc -mtune=ultrasparc -O3 -pipe -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I/usr/include -I../include tracepath.c -lresolv -o tracepath In file included from include-glibc/netinet/in.h:7, from /usr/include/netdb.h:28, from tracepath.c:19: /usr/include/linux/in.h:140: error: field `gr_group' has incomplete type /usr/include/linux/in.h:146: error: field `gsr_group' has incomplete type /usr/include/linux/in.h:147: error: field `gsr_source' has incomplete type /usr/include/linux/in.h:153: error: field `gf_group' has incomplete type /usr/include/linux/in.h:156: error: field `gf_slist' has incomplete type tracepath.c: In function `recverr': tracepath.c:105: warning: implicit declaration of function `ntohs' tracepath.c: In function `probe_ttl': tracepath.c:235: warning: implicit declaration of function `htons' make: *** [tracepath] Error 1 !!! ERROR: net-misc/iputils-020927 failed. !!! Function src_compile, Line 33, Exitcode 2 !!! (no error message) --- x86 (2.6.0-tes4 headers) --- >>> md5 src_uri ;-) iputils-ss020927.tar.gz >>> Unpacking source... >>> Unpacking iputils-ss020927.tar.gz to /var/tmp/portage/iputils-020927/work >>> Source unpacked. gcc -D_GNU_SOURCE -O2 -mips3 -mabi=32 -pipe -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I/usr/include -I../include tracepath.c -lresolv -o tracepath In file included from include-glibc/netinet/in.h:7, from /usr/include/netdb.h:28, from tracepath.c:19: /usr/include/linux/in.h:140: error: field `gr_group' has incomplete type /usr/include/linux/in.h:146: error: field `gsr_group' has incomplete type /usr/include/linux/in.h:147: error: field `gsr_source' has incomplete type /usr/include/linux/in.h:153: error: field `gf_group' has incomplete type /usr/include/linux/in.h:156: error: field `gf_slist' has incomplete type tracepath.c: In function `recverr': tracepath.c:105: warning: implicit declaration of function `ntohs' tracepath.c: In function `probe_ttl': tracepath.c:235: warning: implicit declaration of function `htons' make: *** [tracepath] Error 1 !!! ERROR: net-misc/iputils-020927 failed. !!! Function src_compile, Line 33, Exitcode 2 !!! (no error message) If you try the iputils-ss021109-try package, it will compile, but these are the results: [root@isengard iputils]# ping www.yahoo.com PING www.yahoo.akadns.net (216.109.118.67) 56(84) bytes of data. 64 bytes from p4.www.dcn.yahoo.com (216.109.118.67): icmp_seq=1 ttl=51 time=2083158 ms 64 bytes from p4.www.dcn.yahoo.com (216.109.118.67): icmp_seq=2 ttl=51 time=2082143 ms 64 bytes from p4.www.dcn.yahoo.com (216.109.118.67): icmp_seq=3 ttl=51 time=2081133 ms ^-- As one can see, the time value is horribly off. Who knows what else is broken in that package. Considering this package is in all the arch profiles, and is part of a stage3 build, it not being able to build using 2.4.22 or 2.6.0 headers makes this a critical case in my opinion. I'll re-assign it to bug-wranglers to see if some solution can be worked up for this issue. Eventually, we will wind up using these headers, so it's best to get the issue squashed now.
Whoops, pasted the wrong error for x86. That was the output from mips. What I get for having too many ssh windows open. Either way, x86's error message is virtually the same, just the line numbers specified by the error is off by about 5-7 lines.
Josh's error messages occur in same form for iproute under 2.4.22, which in ~x86 at least has been fixed by compiling with /usr/include/linux see http://bugs.gentoo.org/show_bug.cgi?id=25691, suggests building against stable kernel header package is good idea.
I took a look at the sys-apps/iproute-20010824-r4 ebuild,and didn't see anything at first that looks like it fixes the iputils thing, except the "emake KERNEL_HEADER="/usr/include"" bit. I looked at the iputils ebuild, and it already has this in. Removing it actually allows the package to build on my sparc box, but I get a bunch of warnings similar to this below: /usr/src/linux/include/linux/byteorder/swab.h:206: warning: left shift count >= width of type ping also doesn't seem to return realistic resultson my sparc box at times: 64 bytes from p11.www.dcn.yahoo.com (216.109.118.74): icmp_seq=2 ttl=51 time=472496 ms and at other times: 64 bytes from p6.www.dcn.yahoo.com (216.109.118.69): icmp_seq=2 ttl=51 time=24.2 ms Rather weird.
I've tried to hack iputils to compile against 2.6 headers and found out that glibc provides ipv6 header files in netinet/{ip6,icmp6}.h, the attached file will compile with these headers, could you please test it (since I have no ipv6).
Created attachment 19403 [details] iputils which compiles agains 2.6 headers
For what its worth net-misc/iputils-021109 merged tester root # emerge info Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test9-mm1) ================================================================= System uname: 2.6.0-test9-mm1 i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -fomit-frame-pointer -Os -falign-jumps=4 -falign-functions=4 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/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 -fomit-frame-pointer -Os -falign-jumps=4 -falign-functions=4 -pipe" DISTDIR="/home/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox userpriv" GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo http://gentoo.orgenstate.edu/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/" MAKEOPTS="-j4 " PKGDIR="/home/portage/packages" PORTAGE_TMPDIR="/home/tmp" PORTDIR="/home/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnowext X alsa apm arts avi berkdb bonobo cdr crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 gvim hpijs imlib java jpeg kde libg++ libwww mad mikmod mmxext motif mozilla mpeg ncurses oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby samba sdl slang snmp spell sse ssl svga tcltk tcpd truetype x86 xml2 xmms xv zlib" This is useing linux-headers-2.4.23 rebuilt glibc and gcc-3.3.2-r3. But /usr/src/linux==> 2.6.0-test9-mm1 hielvc
Good to hear. Anyone tried this against 2.6 headers by chance? I'm willing to bet they'd compile against it, but I haven't tried yet. If no outstanding bugs on iputils and newer headers show up, Then it may be time to look at unlocking the headers finally.
For compilation against 2.6 headers, please see my earlier comments and the attachment, that should fix some problems but is rather untested (ipv4 works, ipv6 is unknown)
How about an updated patch for iputils-021109?
iputils-021109 FAILS against 2.6 headers on my machine: USE="-ipv6" emerge iputils Calculating dependencies ...done! >>> emerge (1 of 1) net-misc/iputils-021109 to / >>> md5 src_uri ;-) iputils-ss021109-try.tar.bz2 >>> Unpacking source... >>> Unpacking iputils-ss021109-try.tar.bz2 to /var/tmp/portage/iputils-021109/work >>> Source unpacked. make[1]: Entering directory `/var/tmp/portage/iputils-021109/work/iputils/libipsec' gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/gl ibc-bugs.h -I/usr/include -I../include -DDO_IPSEC -Ilibipsec -include ../include-glibc/gli bc-bugs.h -I../include-glibc -I/usr/src/linux/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall -c -o ipsec_dump_policy.o ipsec_dump_policy.c <command line>:138500533:23048: include-glibc/glibc-bugs.h: No such file or directory In file included from ../include-glibc/netinet/ipsec.h:1, from ipsec_dump_policy.c:37: ../include-glibc/net/pfkeyv2.h:7:1: warning: "SADB_X_AALG_NULL" redefined In file included from ../include-glibc/net/pfkeyv2.h:5, from ../include-glibc/netinet/ipsec.h:1, from ipsec_dump_policy.c:37: /usr/src/linux/include/linux/pfkeyv2.h:276:1: warning: this is the location of the previous definition In file included from ../include-glibc/netinet/ipsec.h:1, from ipsec_dump_policy.c:37: ../include-glibc/net/pfkeyv2.h:20:1: warning: "SADB_X_EALG_BLOWFISHCBC" redefined In file included from ../include-glibc/net/pfkeyv2.h:5, from ../include-glibc/netinet/ipsec.h:1, from ipsec_dump_policy.c:37: /usr/src/linux/include/linux/pfkeyv2.h:284:1: warning: this is the location of the previous definition make[1]: *** [ipsec_dump_policy.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/iputils-021109/work/iputils/libipsec' make: *** [subdirs] Error 2 !!! ERROR: net-misc/iputils-021109 failed. !!! Function src_compile, Line 34, Exitcode 2 !!! (no error message)
Same errors here with 2.6 headers. However the patched version proposed here compiles fine.
Fixed: iputils-021109 should compile fine against the latest linux-headers-2.6.0.
Fixed.