When trying to emerge iptarf, compliation fails with warnings about redifinitions. Reproducible: Always Steps to Reproduce: 1. emerge iptraf Actual Results: # emerge iptraf Calculating dependencies ...done! >>> emerge (1 of 1) net-analyzer/iptraf-2.7.0-r1 to / >>> md5 files ;-) iptraf-2.7.0-r1.ebuild >>> md5 files ;-) iptraf-2.7.0.ebuild >>> md5 files ;-) ChangeLog >>> md5 files ;-) metadata.xml >>> md5 files ;-) files/digest-iptraf-2.7.0-r1 >>> md5 files ;-) files/digest-iptraf-2.7.0 >>> md5 files ;-) files/iptraf-2.7.0-atheros.patch >>> md5 src_uri ;-) iptraf-2.7.0.tar.gz >>> md5 src_uri ;-) iptraf-2.7.0-ipv6-alpha11.diff >>> Unpacking source... >>> Unpacking iptraf-2.7.0.tar.gz to /var/tmp/portage/iptraf-2.7.0-r1/work * Applying iptraf-2.7.0-atheros.patch ... [ ok ] * Applying iptraf-2.7.0-ipv6-alpha11.diff ... [ ok ] >>> Source unpacked. rm -f *.o *~ core iptraf rvnamed rawtime cfconv make -C ../support clean make[1]: Entering directory `/var/tmp/portage/iptraf-2.7.0-r1/work/iptraf-2.7.0/support' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. rm -rf *.o *~ libtextbox.a libtextbox.so make[1]: Leaving directory `/var/tmp/portage/iptraf-2.7.0-r1/work/iptraf-2.7.0/support' gcc -O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe -DWORKDIR=\"/var/lib/iptraf\" -DLOGDIR=\"/var/log/iptraf\" -DEXECDIR=\"/usr/sbin\" -I/usr/include/ncurses -I../support -DVERSION=\"2.7.0\" -DPLATFORM=\"Linux/i386\" -c -o iptraf.o iptraf.c gcc -O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe -DWORKDIR=\"/var/lib/iptraf\" -DLOGDIR=\"/var/log/iptraf\" -DEXECDIR=\"/usr/sbin\" -I/usr/include/ncurses -I../support -DVERSION=\"2.7.0\" -DPLATFORM=\"Linux/i386\" -c -o itrafmon.o itrafmon.c In file included from tcptable.h:27, from iptraf.c:54: /usr/include/net/if.h:45: error: parse error before numeric constant /usr/include/net/if.h:111: error: redefinition of `struct ifmap' /usr/include/net/if.h:126: error: redefinition of `struct ifreq' /usr/include/net/if.h:176: error: redefinition of `struct ifconf' make: *** [iptraf.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from othptab.h:22, from itrafmon.c:30: addproto.h:4:1: warning: "IPPROTO_GRE" redefined In file included from /usr/include/netinet/ip6.h:23, from itrafmon.c:26: /usr/include/netinet/in.h:64:1: warning: this is the location of the previous definition In file included from tcptable.h:27, from itrafmon.c:29: /usr/include/net/if.h:45: error: parse error before numeric constant /usr/include/net/if.h:111: error: redefinition of `struct ifmap' /usr/include/net/if.h:126: error: redefinition of `struct ifreq' /usr/include/net/if.h:176: error: redefinition of `struct ifconf' make: *** [itrafmon.o] Error 1 !!! ERROR: net-analyzer/iptraf-2.7.0-r1 failed. !!! Function src_compile, Line 34, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message. Expected Results: Get emerged successfully. Gentoo Base System version 1.6.10 Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r5 i686) ================================================================= System uname: 2.6.11-gentoo-r5 i686 Pentium III (Coppermine) Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 17 2005, 05:35:53)] ccache version 2.4 [enabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aalib alsa apm arts avi berkdb bitmap-fonts cdr cpdflib crypt cups curl dba emboss encode esd fam flac foomaticdb fortran gd gd-external gdbm gif gnome gpm gstreamer gtk gtk2 imagemagick imlib ipv6 java jpeg junit k de libg++ libusb libwww mad mikmod mmx motif mp3 mpeg mysql ncurses nls ogg oggvorbis opengl pam pdflib perl png ppds python qt quicktime readline samba scanner sdl slang speex spell sse ssl svga tcpd tetex tiff truetype truet ype-fonts type1-fonts usb vorbis xml xml2 xmms xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
I have the same glibc version you have (thus same /usr/include/net/if.h) and I could not reproduce the problem. :-(
Marcelo, do you also have ipv6 in your USE? It could be related... I took a look in in.h at the mentioned lines, here they are: -=[ file /usr/include/net/in.h ]=- enum { IFF_UP = 0x1, /* Interface is up. */ /* LINE 45 */ # define IFF_UP IFF_UP IFF_BROADCAST = 0x2, /* Broadcast address valid. */ # define IFF_BROADCAST IFF_BROADCAST IFF_DEBUG = 0x4, /* Turn on debugging. */ === struct ifmap { /* LINE 111 */ unsigned long int mem_start; unsigned long int mem_end; unsigned short int base_addr; === struct ifreq { /* LINE 126 */ # define IFHWADDRLEN 6 # define IFNAMSIZ IF_NAMESIZE union { char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "en0". */ } ifr_ifrn; === struct ifconf { /* LINE 176 */ int ifc_len; /* Size of buffer. */ union { __caddr_t ifcu_buf; struct ifreq *ifcu_req; } ifc_ifcu; };
Yep, I have ipv6 in USE too. Your if.h indeed seems to be the same as mine. :-|
Hello, i had that same error. I downgraded to linux-headers.2.6.8.1-r1 and iptraf compile now without problems. kernel team, please fix it.
Both iptraf-2.7.0-r1 and iptraf-2.7.0 fail compiling for me too CFLAGS="-march=athlon-xp -O2 -mmmx -msse -pipe -fomit-frame-pointer" USE="-ipv6" linux-headers-2.6.11 same error as listed in previous commments. trying the linux-headers downgrade to see if it works.
same error: Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.11.10-vs2.0-rc2_mercure_03_vs i686) ================================================================= System uname: 2.6.11.10-vs2.0-rc2_mercure_03_vs i686 AMD Athlon(tm) 4 Processor Gentoo Base System version 1.6.12 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5, 2.4.1 sys-apps/sandbox: 1.2.8 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.16-r1 sys-devel/libtool: 1.5.18 virtual/os-headers: 2.6.11-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_GB" LC_ALL="en_GB" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnowex X a52 aac aalib alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts bzlib cairo caps cdr cle266 cmov crypt cups curl cx8 dba de directfb divx4linux djbfft doc dpms dts dv dvb dvd dvdread elf emacs emboss encode escreen esd ethereal fbcon ffmpeg fftw flac font-server foomaticdb fortran fpu fpx ftp fxsr gd gdbm gif gnutls gpm graphviz gstreamer gtk gtk2 hdf5 imagemagick imlib ipv6 java javascript jbig jpeg kerberos krb4 lcms ldap libcaca libclamav libg++ libwww lirc live lzo mad matroska matrox mbox mca mce mikmod mmap mmx mng motif mp3 mpeg mpi msr mtrr mysql mythtv ncurses network nls nptl objc odbc ogg oggvorbis opengl oss pae pam pam_chroot pam_console pam_timestamp pat pcre pdflib perl pge plotutils png pnp posix postgres pse pse36 pwdb python qt quicktime readline real rrdtool rtc ruby samba sasl sdl sendfile sep serial skey slang sndfile snmp speex spell sse ssl streamzap svga sysfs syslog sysvipc tcpd tetex tga theora threads tiff truetype truetype-fonts tsc type1-fonts unicode v4l v4l2 vcd vidix vim vme vorbis win32codecs wmf xanim xine xinerama xml xml2 xmlrpc xmms xpm xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
*** Bug 96475 has been marked as a duplicate of this bug. ***
*** Bug 97024 has been marked as a duplicate of this bug. ***
I downgraded linux-headers to stable (x86 [2.6.8.1-r4]), instead of unstable (~x86 [2.6.11-r2]) and iptraf compiled fine. I am not sure on wether this is a problem with linux-headers or iptraf - but if someone else does, feel free to change the Component/Summary/Assigned To further :)
Well, the problem is that new kernel-headers are now stable, and I get the same error after upgrading to them. This makes it a rather serious problem for lots of people now (not only ~ testers). [a]
hi all. i have same error: Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.12-gentoo-r3 i686) ================================================================= System uname: 2.6.12-gentoo-r3 i686 AMD Athlon(tm) Gentoo Base System version 1.6.12 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache collision-protect distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LANG="ru_RU.KOI8-R" LC_ALL="ru_RU.KOI8-R" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowex 3dnowext 7zip X aac aalib accessibility acl acpi activefilter adns aim alsa amuled apache2 applet artworkextra atm audio audiofile avi bash-completion bcmath berkdb bidi bitmap-fonts bmp bonobo buttons bzip2 bzlib cairo calendar caps cdparanoia cdr chroot cjk clamav cpdflib cpudetection crypt css cups curl curlwrappers customlog dba dbus dga dhcp dillo divx4linux doc dv dvb dvd dvdr dvdread dynagraph ecc edl eds emacs emboss encode epiphany escreen etwin exif extensions extras fam ffmpeg filepro flac font-server foomaticdb fortran fpx freetype ftp gcj gd geoip gg ggi gif glitz gnome-print gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal howl iconv icq idea imagemagick imap imlib irc java jbig jpeg jpeg2k justify kde kdeenablefinal kdexdeltas kdgraphics kig-scripting lcms ldap leim lesstif libcaca libclamav libedit libfpx libg++ libwww lirc lj logrotate lzo mad mailbox maildir mailwrapper matroska mbox md5sum mikmod milter mime mjpeg mmx mmxext mng mono mozilla moznomail mozsvg mozxmlterm mp3 mpeg mpi mplayer mppe-mppc musepack mysql mythtv nas ncurses nethack network nis nls nntp nptl nptlonly nvidia objc odbc offensive ogg oggvorbis opengl openntpd openssh oss pam pccts pcntl pcre pdflib perl php plugin png portaudio posix povray python qt quicktime radius rar readline real remote rss rtc rube ruby sasl sdl session sharedext silc simplexml slang slp sndfile sockets socks5 speedo speex spell sqlite sse ssl stats subtitles subversion svg symlink tcltk tcpd tetex theora threads tiff toolbar truetype truetype-fonts type1 type1-fonts underscores unicode usb v4l v4l2 vcd vda vhosts visualization vorbis win32codecs wma123 wmf xanim xface xine xinerama xml xml2 xmms xosd xpm xrandr xsl xv xvid xvmc yahoo zeroconf zlib zvbi userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS
same error here, without ipv6 flag
Problem present with linux-headers-2.6.11-r2 USE="-ipv6" emerge info: splat ~ # emerge info Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.12-gentoo-r4 i686) ================================================================= System uname: 2.6.12-gentoo-r4 i686 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.12 ccache version 2.3 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.channelx.biz/ http://ftp.isu.edu.tw/pub/Linux/Gentoo http://mymirror.asiaosc.org/gentoo/ http://mirror.averse.net/pub/gentoo/" LINGUAS="hi" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac aalib abook acl acpi alsa apache2 apm artworkextra audiofile avi bash-completion bashlogger berkdb bitmap-fonts bonobo bzip2 cdda cddb cdio cdparanoia cdr crypt cups curl dhcp dts dv dvd dvdread eds emboss encode esd fam ffmpeg flac font-server foomaticdb fortran freetype gd gdbm gif gkrellm gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal howl imagemagick imap imlib jack java javascript jpeg kde kdeenablefinal kdexdeltas lcms libcaca libg++ libwww lm_sensors logrotate mad mbox md5sum mmx mmxext motif mozilla mp3 mpeg mplayer nas ncurses nls nptl nvidia offensive ogg oggvorbis opengl oss pam pdflib perl pic png python qt quicktime rar readline real rtc sdl slang sndfile socks5 speex spell sse ssl subtitles svg svga symlink tcpd theora threads tidy tiff toolbar truetype truetype-fonts type1-fonts unicode usb vcd vorbis win32codecs wmf wxwindows xine xml xml2 xmms xprint xv xvid xvmc zeroconf zlib linguas_hi userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Created attachment 63582 [details, diff] patch to get iptraf 1.2.7 compiling with linux-headers-2.6.11-r2 path to have iptraf compiling with sys-kernel/linux-headers-2.6.11-r2 (for 2.6.12 another path will be needed to include linux/netdevice.h when linux/if_fddi.h is included)
Same problem, the compilations with linux-headers-2.6.11-r2 fails due to updates in if_fddi.h which need to include linux/netdevice.h, this last one include linux/if.h. And net/if.h and linux/if.h have common declaration of struct, so there are "error: redefinition" of thoses. Yes new kernel header blocks iptraf but they are ok. I think iptraf (as far it mixes headers from the kernel and from the glibc) must be adapted/upgraded to fit with the new headers (nearly the same probleme with 2.6.12 upstream may need to fix that). In order to have iptraf compiled I change tcptable.h and packet.c to have theirs includes behave like that : #include <net/if.h> #ifdef _NET_IF_H #define _LINUX_IF_H #endif #include <linux/if_packet.h> #include <linux/if_ether.h> #include <linux/if_fddi.h> #include <linux/if_tr.h> //#include <net/if.h> This makes linux/if.h not included if net/if.h is and as a result iptraf compiles (I'm not shure it's a good solution). The patch I just submited do that.
patch doesn't work at all. In file included from /usr/include/stdlib.h:433, from tcptable.h:9, from othptab.c:26: /usr/include/sys/types.h:62: error: conflicting types for 'dev_t' /usr/include/linux/types.h:25: error: previous declaration of 'dev_t' was here /usr/include/sys/types.h:72: error: conflicting types for 'mode_t' /usr/include/linux/types.h:31: error: previous declaration of 'mode_t' was here /usr/include/sys/types.h:77: error: conflicting types for 'nlink_t' /usr/include/linux/types.h:34: error: previous declaration of 'nlink_t' was here In file included from /usr/include/sys/types.h:133, from /usr/include/stdlib.h:433, from tcptable.h:9, from othptab.c:26: /usr/include/time.h:104: error: conflicting types for 'timer_t' /usr/include/linux/types.h:43: error: previous declaration of 'timer_t' was here In file included from /usr/include/sys/types.h:216, from /usr/include/stdlib.h:433, from tcptable.h:9, from othptab.c:26: /usr/include/sys/select.h:78: error: conflicting types for 'fd_set' /usr/include/linux/types.h:22: error: previous declaration of 'fd_set' was here In file included from /usr/include/sys/uio.h:29, from /usr/include/sys/socket.h:27, from /usr/include/netinet/in.h:24, from /usr/include/netdb.h:28, from tcptable.h:15, from othptab.c:26: /usr/include/bits/uio.h:43: error: redefinition of `struct iovec' In file included from /usr/include/sys/socket.h:35, from /usr/include/netinet/in.h:24, from /usr/include/netdb.h:28, from tcptable.h:15, from othptab.c:26: /usr/include/bits/socket.h:146: error: redefinition of `struct sockaddr' /usr/include/bits/socket.h:163: error: redefinition of `struct __kernel_sockaddr_storage' /usr/include/bits/socket.h:173: error: parse error before numeric constant /usr/include/bits/socket.h:188: error: parse error before numeric constant /usr/include/bits/socket.h:216: error: redefinition of `struct msghdr' /usr/include/bits/socket.h:231: error: redefinition of `struct cmsghdr' /usr/include/bits/socket.h:258: error: conflicting types for '__cmsg_nxthdr' /usr/include/linux/socket.h:130: error: previous definition of '__cmsg_nxthdr' was here /usr/include/bits/socket.h:286: error: parse error before numeric constant /usr/include/bits/socket.h:297: error: redefinition of `struct ucred' /usr/include/bits/socket.h:309: error: redefinition of `struct linger' In file included from tcptable.h:23, from othptab.c:26: /usr/include/net/if.h:45: error: parse error before numeric constant /usr/include/net/if.h:111: error: redefinition of `struct ifmap' /usr/include/net/if.h:126: error: redefinition of `struct ifreq' /usr/include/net/if.h:176: error: redefinition of `struct ifconf' In file included from othptab.h:22, from othptab.c:27: addproto.h:4:1: warning: "IPPROTO_GRE" redefined In file included from /usr/include/netdb.h:28, from tcptable.h:15, from othptab.c:26: /usr/include/netinet/in.h:64:1: warning: this is the location of the previous definition make: *** [othptab.o] Error 1 !!! ERROR: net-analyzer/iptraf-2.7.0-r1 failed. !!! Function src_compile, Line 34, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message.
oupss I forgot that I have clean up include order in othptab.c So the next patch should work, but it is a minimum to have iptraf compiling with current linux-hearders.
Created attachment 63610 [details, diff] makes iptraf compiles with linux-headers-2.6.11-r2 This new patch makes changes in othptab.c in addition of packet.c and tcptable.h. I have tested it this time with updating my ebuild and emerging, so it should work as it does for me.
tested here, it works good. please apply to portage and close this bug.
works fine with: sys-kernel/linux-headers-2.6.11-r2 sys-libs/glibc-2.3.5 sys-kernel/gentoo-sources-2.6.12-r6 net-analyzer/iptraf-2.7.0-r1 procedure: ebuild /usr/portage/net-analyzer/iptraf/iptraf-2.7.0-r1.ebuild unpack cd /var/tmp/portage/iptraf-2.7.0-r1/work/iptraf-2.7.0 wget http://bugs.gentoo.org/attachment.cgi\?id=63610 -O patch patch -p1 < patch rm patch cd ebuild /usr/portage/net-analyzer/iptraf/iptraf-2.7.0-r1.ebuild merge iptraf
In cvs. Thanks much Aurelien.
I added some coment in another iptraf bug, but seems this is the right place. I'm having problems unpacking iptraf. It seems some problem with offset. I'll be adding a fixed patch.
Created attachment 63723 [details] iptraf-2.7.0-2.6.patch
This probably doesn't fix things, as there is one conditional patch that patches something in the context of another conditional patch. As I told ka0ttic, I think the best way is to make one unconditional patch that moves the two parts a bit apart so the two conditional patches can each find their own bit to patch. Don't believe me? Try without ipv6 use flag.
Yeah sorry I meant to reopen this yesterday when griffon26 gave me the heads up that the new patch conflicts with the ipv6 patch. Stay tuned. I'll have to figure something out.
Ok, I've converted the ipv6 patch to an unconditional one and modified the 2.6 patch accordingly. Everything should be groovy now.
Great :D, thx Aaron. As I said my patch was a minimum (I doesn't use ipv6) and as iptraf hasn't change since May 2002 (at that date kernel 2.6.0 hasn't been realesed) it may need a biger update. (Include statements may need cleaning, with 2.6.12 linux/netdevice.h need to be included (as if_fddi.h doesn't include netdevice.h for struc net_device_stats)... it's not the end of the patch :/ )
Now compiles for me [reporter of bug] under sys-kernel/linux-headers-2.6.11-r2 and net-analyzer/iptraf-2.7.0-r1. Thanks