Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48747 - tcpdump-3.8.3-r1 doesn't build with gcc-3.4 and -O2+
Summary: tcpdump-3.8.3-r1 doesn't build with gcc-3.4 and -O2+
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 17:57 UTC by Ahmed Farid
Modified: 2005-05-11 08:05 UTC (History)
1 user (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 Ahmed Farid 2004-04-22 17:57:49 UTC
it doesn't like -funit-at-a-time which gets enabled by default in -O2 and -O3 in gcc-3.4.
fix : 
[ `gcc -dumpversion 2>&1` == "3.4.0" ] && append-flags -fno-unit-at-a-time

should go above the econf line in src_compile


Reproducible: Always
Steps to Reproduce:
1. emerge =gcc-3.4
2. CFLAGS="...... -O2" emerge tcpdump


Actual Results:  
Dies with : tcpdump.o(.text+0x915): In function `main': 
: undefined reference to `pcap_debug' 
collect2: ld returned 1 exit status 

Expected Results:  
it should compile and work happily ever after. 

Portage 2.0.51_pre3 (2004.0, gcc-3.4.0, glibc-2.3.3_pre20040207-r0, 
2.6.5-Speedy3) 
================================================================= 
System uname: 2.6.5-Speedy3 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz 
Gentoo Base System version 1.4.9 
ccache version 2.3 [enabled] 
Autoconf: sys-devel/autoconf-2.59-r3 
Automake: sys-devel/automake-1.8.3 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="no" 
CFLAGS="-march=pentium4 -O2 -ftracer -pipe -fomit-frame-pointer -mfpmath=sse 
-ffast-math   -fweb" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /etc/X11/XF86Config /etc/fstab /etc/make.conf /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/kde/cvs/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=pentium4 -O2 -ftracer -pipe -fomit-frame-pointer -mfpmath=sse 
-ffast-math   -fweb" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache psyco" 
GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ 
http://www.zentek-international.com/mirrors/gentoo/ 
http://ftp.easynet.nl/mirror/gentoo/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-portage" 
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" 
USE="X alsa apache2 applypatches arts atm avi chroot crypt cups curl encode 
fbcon flash foomaticdb gd gdbm gif gpm gtk gtk2 imlib javascript jpeg kde 
libwww maildir md5sum mmx mozinterfaceinfo moznoirc moznomail mozp3p mozsvg 
mpeg mysql ncurses nptl offensive oggvorbis opengl pam pdflib perl php pic png 
ppds python qt quicktime readline sasl sdl spell sse ssl threads tiff truetype 
x86 xml xml2 xmms xosd xv xvid zlib"
Comment 1 SpanKY gentoo-dev 2004-05-02 00:33:49 UTC
fixed in cvs, thanks
Comment 2 P Nienaber 2004-07-13 23:21:57 UTC
does this again with 3.4.1.  please reopen or fix, spanky ;)
Comment 3 Travis Tilley (RETIRED) gentoo-dev 2004-07-14 16:33:49 UTC
fixed... again :)
Comment 4 Stéphane Gimenez 2005-05-11 08:05:30 UTC
Same problem with gcc-4.0.{0,1-beta}.

Could the test be changed to the following?

if [ "`gcc-major-version`" -ge "4" -o "`gcc-major-version`" -ge "3" -a "`gcc-minor-version`" -ge "4" ] ;

Thanks.