Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25459 - iputils which would build against 2.6 source?
Summary: iputils which would build against 2.6 source?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-28 15:02 UTC by Boyd Waters
Modified: 2004-01-03 07:05 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
iputils which compiles agains 2.6 headers (iputils-020927.tar.gz,8.22 KB, application/x-gzip-compressed)
2003-10-18 08:42 UTC, Peter Gnodde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boyd Waters 2003-07-28 15:02:15 UTC
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...
Comment 1 Bret Towe 2003-08-06 14:11:38 UTC
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
Comment 2 Boyd Waters 2003-08-06 14:30:21 UTC
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.
Comment 3 Bret Towe 2003-08-06 16:01:16 UTC
/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
Comment 4 Bret Towe 2003-08-08 16:29:40 UTC
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 :\
Comment 5 Boyd Waters 2003-08-09 14:12:39 UTC
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.
Comment 6 Joshua Kinard gentoo-dev 2003-09-04 00:27:33 UTC
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.
Comment 7 Joshua Kinard gentoo-dev 2003-09-04 00:32:07 UTC
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.

Comment 8 Rob Davies 2003-09-08 07:58:03 UTC
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. 
Comment 9 Joshua Kinard gentoo-dev 2003-09-12 20:10:49 UTC
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.


Comment 10 Peter Gnodde 2003-10-18 08:41:27 UTC
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).
Comment 11 Peter Gnodde 2003-10-18 08:42:01 UTC
Created attachment 19403 [details]
iputils which compiles agains 2.6 headers
Comment 12 Hiel Van Campen 2003-11-30 18:25:10 UTC
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 
Comment 13 Joshua Kinard gentoo-dev 2003-11-30 18:48:41 UTC
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.
Comment 14 Peter Gnodde 2003-12-01 02:21:32 UTC
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)
Comment 15 Aaron Gyes 2003-12-08 19:36:17 UTC
How about an updated patch for iputils-021109?
Comment 16 Boyd Waters 2003-12-08 19:40:18 UTC
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)


Comment 17 jack_mort 2003-12-26 15:54:05 UTC
Same errors here with 2.6 headers. However the patched version proposed here compiles fine.
Comment 18 Tim Yamin (RETIRED) gentoo-dev 2004-01-03 07:05:15 UTC
Fixed: iputils-021109 should compile fine against the latest linux-headers-2.6.0.
Comment 19 Tim Yamin (RETIRED) gentoo-dev 2004-01-03 07:05:28 UTC
Fixed.