i686-pc-linux-gnu-gcc -O0 -march=nocona -mtune=nocona -pipe -fomit-frame-pointer -ggdb -std=gnu99 -W -Wall -Wdeclaration-after-statement -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -o .libs/sndfile-convert sndfile-convert.o ../src/.libs/libsndfile.so /usr/lib/libFLAC.so -lm ../src/.libs/libsndfile.so: undefined reference to `s2flac16_array' ../src/.libs/libsndfile.so: undefined reference to `s2flac8_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac8_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac24_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac16_array' ../src/.libs/libsndfile.so: undefined reference to `s2flac24_array' collect2: ld returned 1 exit status make[1]: *** [sndfile-convert] Error 1 make[1]: *** Waiting for unfinished jobs.... i686-pc-linux-gnu-gcc -O0 -march=nocona -mtune=nocona -pipe -fomit-frame-pointer -ggdb -std=gnu99 -W -Wall -Wdeclaration-after-statement -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -o .libs/sndfile-info sndfile-info.o ../src/.libs/libsndfile.so /usr/lib/libFLAC.so -lm ../src/.libs/libsndfile.so: undefined reference to `s2flac16_array' ../src/.libs/libsndfile.so: undefined reference to `s2flac8_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac8_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac24_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac16_array' ../src/.libs/libsndfile.so: undefined reference to `s2flac24_array' collect2: ld returned 1 exit status make[1]: *** [sndfile-info] Error 1 i686-pc-linux-gnu-gcc -O0 -march=nocona -mtune=nocona -pipe -fomit-frame-pointer -ggdb -std=gnu99 -W -Wall -Wdeclaration-after-statement -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -o .libs/sndfile-play sndfile-play.o ../src/.libs/libsndfile.so /usr/lib/libFLAC.so /usr/lib/libasound.so -ldl -lpthread -lm ../src/.libs/libsndfile.so: undefined reference to `s2flac16_array' ../src/.libs/libsndfile.so: undefined reference to `s2flac8_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac8_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac24_array' ../src/.libs/libsndfile.so: undefined reference to `i2flac16_array' ../src/.libs/libsndfile.so: undefined reference to `s2flac24_array' collect2: ld returned 1 exit status make[1]: *** [sndfile-play] Error 1 make[1]: Leaving directory `/var/tmp/portage/libsndfile-1.0.15/work/libsndfile-1.0.15/examples' make: *** [all-recursive] Error 1 !!! ERROR: media-libs/libsndfile-1.0.15 failed. Call stack: ebuild.sh, line 1573: Called dyn_compile ebuild.sh, line 982: Called src_compile emerge --info Portage 2.1_pre6-r7 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.4-r1, 2.6.16-gentoo i686) ================================================================= System uname: 2.6.16-gentoo i686 Intel(R) Pentium(R) 4 CPU 3.20GHz Gentoo Base System version 1.12.0_pre16 dev-lang/python: 2.3.5, 2.4.2-r1 sys-apps/sandbox: 1.2.17 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.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=nocona -mtune=nocona -pipe -fomit-frame-pointer -ggdb" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=nocona -mtune=nocona -pipe -fomit-frame-pointer -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms splitdebug strict" GENTOO_MIRRORS="http://gentoo.intergenia.de http://mirror.ovh.net/gentoo-distfiles/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://ftp.lug.ro/gentoo/ http://gentoo.inode.at/" LANG="en_GB.UTF-8" LC_ALL="en_GB.UTF-8" LINGUAS="en_GB" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X a52 aac aalib acl acpi aim alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bonobo browserplugin bzip2 bzlib caps cdparanoia cdr cjk cli crypt ctype cups curl dba dbus doc dri dts dvd dvdr dvdread eds emacs emboss encode esd ethereal examples exif expat fam fastbuild fbcon ffmpeg flac foomaticdb force-cgi-redirect fortran ftp gcj gd gdbm gif glut gmp gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal iconv icq idn ieee1394 imagemagick imlib ipv6 jabber jack java javascript jce jpeg junit kde lcms leim libg++ libgda libwww lm_sensors logrotate mad mbox memlimit mikmod milter mime mmap mmx mng motif mozilla mp3 mpeg mpi msn ncurses nls nptl nsplugin offensive ogg oggvorbis openal opengl oscar oss pam pcntl pcre pdflib perl png posix postgres profile python qt quicktime readline recode sdl session sharedmem simplexml sndfile snmp soap sockets sox speex spell spl sse ssl svg sysvipc tcltk tcpd tetex theora threads tiff tokenizer truetype truetype-fonts type1-fonts udev unicode usb v4l vhosts vorbis win32codecs wmf wxwindows xface xine xml xml2 xmms xsl xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en_GB userland_GNU video_cards_ati video_cards_vesa video_cards_fbdev" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS
Can you please provide a full build log?
Created attachment 83081 [details] Build Log as requested Build log as requested
Doesn't build here either. I think it's a gcc-4.1.0 problem, if I switch to gcc-3.4.5 it builds.
Confirming bug (same kernel and toolchain). I tried re-emerging flac-1.1.2-r4 with no success.
Sorry for posting again, but I forgot to mention that gcc-4.0.2-r1 also builds libsndfile succesfully, so it does look like a gcc prolem.
I find it difficult to be GCC related actually, I'm using GCC 4.1 myself.
Okay the problem is one of the --disable-* parameters, probably --disable-gcc-opt that I misinterpreted. I'll do an -r1 now.
Okay, thanks to Halcy0n who tried, the problem is really with --disable-gcc-opt. I'm committing right now the 1.0.15-r1 that fixes this problem (and maybe also the -fPIC problem). I didn't hit this one because I use -Os instead of -O2.