I've got a compilation error when emerging a52dec-0.7.4: root@kolbe # emerge ac52dec >>> emerge (1 of 1) media-libs/a52dec-0.7.4 to / >>> md5 src_uri ;-) a52dec-0.7.4.tar.gz >>> Unpacking source... >>> Unpacking a52dec-0.7.4.tar.gz to /var/tmp/portage/a52dec-0.7.4/work >>> Source unpacked. (...) /bin/sh ../libtool --mode=link gcc -march=athlon-xp -pipe -mmmx -msse -m3dnow -mfpmath=sse,387 -fomit-frame-pointer -fexpensive-optimizations -fPIC -O3 -fomit-frame-pointer -mcpu=pentiumpro -o a52dec a52dec.o getopt.o gettimeofday.o ../liba52/liba52.la ../libao/libao.a mkdir .libs gcc -march=athlon-xp -pipe -mmmx -msse -m3dnow -mfpmath=sse,387 -fomit-frame-pointer -fexpensive-optimizations -fPIC -O3 -fomit-frame-pointer -mcpu=pentiumpro -o .libs/a52dec a52dec.o getopt.o gettimeofday.o ../liba52/.libs/liba52.so -lm ../libao/libao.a ../libao/libao.a(audio_out_peak.o)(.text+0x151): In function `peak_close': : undefined reference to `log' ../libao/libao.a(audio_out_peak.o)(.text+0x16f): In function `peak_close': : undefined reference to `log' collect2: ld returned 1 exit status make[1]: *** [a52dec] Error 1 make[1]: Leaving directory `/var/tmp/portage/a52dec-0.7.4/work/a52dec-0.7.4/src'make: *** [all-recursive] Error 1 !!! ERROR: media-libs/a52dec-0.7.4 failed. !!! Function src_compile, Line 29, Exitcode 2 !!! emake failed a52dec-0.7.3 compiles perfectly (fortunately).
Wow, those are the craziest CFLAGS I've ever seen, and a good chance why this app (and other things) would fail strangely. Especially the math optimizations, that are known to produce less accurate results, and the conflicting -march/-mcpu Please try with: CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" This should produce much more stable, and still well performing code.
what output does emerge info give?
# emerge info Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0) ================================================================= System uname: 2.6.0 i686 AMD Athlon(tm) MP processor Gentoo Base System version 1.4.3.10 ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe -mmmx -msse -m3dnow -mfpmath=sse,387 -fomit-frame-pointer -fexpensive-optimizations" 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 /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -mmmx -msse -m3dnow -mfpmath=sse,387 -fomit-frame-pointer -fexpensive-optimizations" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache fixpackages sandbox" GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.linux.no/" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X aalib acpi alsa apm avi berkdb bonobo cdr crypt cups dga doc dvd emacs encode esd evo foomaticdb gb gd gdbm ggi gif gnome gpm gstreamer gtk gtk2 imlib java javascript jpeg ldap libg++ libgda libwww mad mcal mikmod mmx motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline samba scanner sdl slang spell ssl svga tcltk tcpd tetex tiff truetype usb v4l vanilla wmf x86 xml2 xmms xv zlib"
It seems the build process add the "-mcpu=pentiumpro": it's not in my CFLAGS.
Seriously, please try this again with the more conservative cflags I posted above. You might also try replacing your -march w/ -mcpu just for this ebuild, as specifying both can cause breakage in some cases. I *highly* recommend using the cflags I've given you, as your current flags are known to cause all sorts of breakage, and their speed benefits are questionable. If you get breakage with my cflags, we have a valid bug.
Bad luck, I afraid: It seem we've got a bug: (...) /bin/sh ../libtool --mode=link gcc -mcpu=athlon-xp -fomit-frame-pointer -fPIC -O3 -fomit-frame-pointer -mcpu=pentiumpro -o a52dec a52dec.o getopt.o gettimeofday.o ../liba52/liba52.la ../libao/libao.a mkdir .libs gcc -mcpu=athlon-xp -fomit-frame-pointer -fPIC -O3 -fomit-frame-pointer -mcpu=pentiumpro -o .libs/a52dec a52dec.o getopt.o gettimeofday.o ../liba52/.libs/liba52.so -lm ../libao/libao.a ../libao/libao.a(audio_out_peak.o)(.text+0x151): In function `peak_close': : undefined reference to `log' ../libao/libao.a(audio_out_peak.o)(.text+0x16f): In function `peak_close': : undefined reference to `log' collect2: ld returned 1 exit status make[1]: *** [a52dec] Error 1 make[1]: Leaving directory `/var/tmp/portage/a52dec-0.7.4/work/a52dec-0.7.4/src'make: *** [all-recursive] Error 1 !!! ERROR: media-libs/a52dec-0.7.4 failed. !!! Function src_compile, Line 29, Exitcode 2 !!! emake failed
Looks like David is correct. When I emerge a52dec here it also has -mcpu=pentiumpro and other flags that I haven't specified. It could still be a problem with his flags, but it certainly looks like -mcpu=pentiumpro is showing up without any effort on his part.
Are you still experiencing this problem? Just tried to reproduce it - I can't.
Please re-open if you can still reproduce the problem.