Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55928 - iptables 1.2.11 doesn't compile
Summary: iptables 1.2.11 doesn't compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 All
: High normal (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-02 20:01 UTC by Blu3
Modified: 2004-07-09 17:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blu3 2004-07-02 20:01:54 UTC
gcc -fPIC -mtune=opteron -march=opteron -O3 -pipe -fexpensive-optimizations -ffast-math -mfpmath=sse,387 -fomit-frame-pointer -fno-stack-protector -Wall -Wunused -I/usr/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.11\"  -fPIC -o extensions/libipt_ah_sh.o -c extensions/libipt_ah.c
In file included from /usr/include/asm/semaphore.h:37,
                 from /usr/include/linux/netfilter_ipv4/ip_tables.h:26,
                 from include/libiptc/libiptc.h:6,
                 from include/iptables.h:5,
                 from extensions/libipt_ah.c:8:
/usr/include/asm/system.h: In function `__cmpxchg':
/usr/include/asm/system.h:249: error: `LOCK_PREFIX' undeclared (first use in this function)
/usr/include/asm/system.h:249: error: (Each undeclared identifier is reported only once
/usr/include/asm/system.h:249: error: for each function it appears in.)
/usr/include/asm/system.h:249: error: parse error before string constant
/usr/include/asm/system.h:255: error: parse error before string constant
/usr/include/asm/system.h:261: error: parse error before string constant
/usr/include/asm/system.h:267: error: parse error before string constant
make: *** [extensions/libipt_ah_sh.o] Error 1

!!! ERROR: net-firewall/iptables-1.2.11-r1 failed.
!!! Function src_compile, Line 96, Exitcode 2
!!! (no error message)



(~) # emerge info
Portage 2.0.50-r8 (gcc34-amd64-2004.1, gcc-3.4.0, glibc-2.3.3_pre20040207-r0,2.3.3_pre20040420-r0,2.3.3_pre20040529-r0,2.3.4.20040605-r0, 2.6.7)
=================================================================
System uname: 2.6.7 x86_64 5
Gentoo Base System version 1.5.1
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1,sys-devel/automake-1.8.5
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="no"
CFLAGS="-fPIC -mtune=opteron -march=opteron -O3 -pipe -fexpensive-optimizations -ffast-math -mfpmath=sse,387 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.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="-fPIC -mtune=opteron -march=opteron -O3 -pipe -fexpensive-optimizations -ffast-math -mfpmath=sse,387 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache keepwork sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
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="GAPING_SECURITY_HOLE S3TC X X509 aac acpi acpi4linux aim alsa amd64 apache2 arts artswrappersuid audiofile avantgo avi bluetooth caps cddb cdf cdr chroot cle266 crypt cups devfs26 dga distcache divx4linux dnd dv dvb dvd dvdr encode esd ethereal faad fam fax ffmpeg fftw flash flexresp fmod foomaticdb freetype fs gd gdbm geoip gif gimp gimpprint glade glut gmp gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml icq idea ieee1394 imagemagick imap imlib imlib2 ipv6 irda irmc jabber jack jack-caps jack-tmpfs java javascript jbig jpeg kadu-modules kadu-voice kde lcms libg++ libgda libwww lirc live ltsp mbox mcal md5sum mdb memlimit mikmod mmap mng mozcalendar mozilla mozinterfaceinfo mozp3p mozsvg mpeg mpeg4 mpi mplayer msn multilib multitarget ncurses nls nptl ntlm nvidia nviz oav odbc offensive oggvorbis openal opengl oscar oss pam parse-clocks pcap pdflib perl php pic plotutils png pnp portaudio postgres ppds pthreads python quicktime readline remote samba scanner sdl slang slp sndfile snmp socks5 sox speedo speex spell ssl t1lib tcpd theora tiff timidity transcode transparent-proxy truetype type1 usb v4l v4l2 wifi wmf xgetdefault xine xinerama xml2 xmms xosd xprint xrandr xv xvid yahoo yaz zlib zvbi"
Comment 1 Shyam Mani (RETIRED) gentoo-dev 2004-07-03 23:25:36 UTC
I get another error, same ebuild.

>>> Install iptables-1.2.11-r1 into /var/tmp/portage/iptables-1.2.11-r1/image/ category net-firewall
gcc -O3 -march=pentium3 -mmmx -pipe -fno-stack-protector -Wall -Wunused -I/usr/src/linux/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.11\"  -fPIC -o extensions/libipt_recent_sh.o -c extensions/libipt_recent.c
In file included from include/libiptc/libiptc.h:6,
                 from include/iptables.h:5,
                 from extensions/libipt_recent.c:8:
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:255: warning: no semicolon at end of struct or union
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:255: error: syntax error before '*' token
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:259: error: syntax error before '}' token
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:339: warning: type defaults to `int' in declaration of `DECLARE_MUTEX'
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:339: warning: parameter names (without types) in function declaration
/usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:339: warning: `DECLARE_MUTEX' declared `static' but never defined
make: *** [extensions/libipt_recent_sh.o] Error 1

!!! ERROR: net-firewall/iptables-1.2.11-r1 failed.
!!! Function src_install, Line 105, Exitcode 2
!!! (no error message)

Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7)
=================================================================
System uname: 2.6.7 i686 Pentium III (Katmai)
Gentoo Base System version 1.5.1
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -mmmx -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.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -mmmx -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache sandbox"
GENTOO_MIRRORS="rsync://203.16.234.20/gentoo/ ftp://203.16.234.19/pub/gentoo/ ftp://linux.thai.net/pub/mirrors/gentoo http://linux.thai.net/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acpi alsa apache2 apm arts avi berkdb cdr crypt cscope cups encode esd ethereal fbcon foomaticdb gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 gtkhtml imlib imlib2 innodb javascript jpeg kde libg++ libwww mad md5sum mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses nls odbc offensive oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sse ssl svga tcltk tcpd tiff truetype usb vanilla x86 xml2 xmms xosd xv xvid zlib"
Comment 2 Shyam Mani (RETIRED) gentoo-dev 2004-07-03 23:28:24 UTC
Sorry, my eariler comment should have mentioned I'm on an Pentium, not AMD.
Comment 3 Daniel Ahlberg (RETIRED) gentoo-dev 2004-07-04 04:36:27 UTC
What version of kernel-headers is installed?  Does 1.2.11-r2 work?
Comment 4 Blu3 2004-07-04 07:50:05 UTC
2.6.7-r1 and no, -r2 doesn't compile either - same error for LOCK_PREFIX.
Comment 5 Daniel Ahlberg (RETIRED) gentoo-dev 2004-07-04 11:27:37 UTC
2.6.7 kernel headers must be patches to allow compilation with iptables. Reassigning to linux-headers maintainer.
Comment 6 Daniel Ahlberg (RETIRED) gentoo-dev 2004-07-04 11:28:05 UTC
Patches are here:
http://cvs.iptables.org/patch-o-matic-ng/updates/
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-07-04 12:24:39 UTC
On line 7 of /usr/include/asm/system.h can you please add "#include <linux/bitops.h> /* for LOCK_PREFIX */" and confirm that that works? The x86 upstream headers include this and thus compile and the amd64 ones don't and fail instead. Thanks...
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-07-09 17:40:07 UTC
This issue should now be solved with sys-kernel/linux26-headers >= 2.6.6 - make sure you sync and remerge. Please reopen this bug if this issue still occurs after doing so. Thanks!