I try to emerge sdl-sound and the link at the end segfaults. Reproducible: Always Steps to Reproduce: 1. emerge sdl-sound Actual Results: gcc -O3 -march=athlon-xp -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -pipe -mfpmath=sse -I/usr/include/SDL -D_REENTRANT -I/usr/include/smpeg -I/usr/include/SDL -D_REENTRANT -pthread -D_REENTRANT -o .libs/playsound playsound.o -Wl,-rpath -Wl,/usr/lib -Wl,-rpath -Wl,/usr/lib -Wl,-rpath -Wl,/usr/lib ../.libs/libSDL_sound.so -L/usr/lib -ldl -ldl -ldl -lm -L/usr/kde/3.1/lib -ldl -lpthread -lm -L/usr/X11R6/lib -ldl -ldl -ldl -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -ldl -ldl -ldl -lm -ldl -lpthread -lm -ldl -ldl -ldl -ldl -lpthread -ldl -lm -ldl -lm -lm -lm -lm -lm -ldl -ldl -ldl -lm -ldl -lpthread -lm -ldl -ldl -ldl -ldl -lpthread -lpthread -lpthread -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -lm -ldl -ldl -ldl -ldl -lm -lm -ldl -lpthread -ldl /usr/kde/3.1/lib/libartsc.so -ldl -lpthread -lpthread -lm -lm -lm -ldl -ldl -ldl -lslang -lm -ldl -lpthread -ldl -lm -ldl -lm -ldl -lm -lm -lm -lm -lm -lm -lm -lm -lm -ldl -lpthread -lm -ldl -lpthread -lpthread -lpthread -lpthread -lm -ldl -lpthread -lm -ldl -lpthread -ldl -lm -ldl -lm -lm -lm -lm -lm -lm -ldl -lpthread -lm -ldl -lpthread /usr/lib/libsmpeg.so -lpthread -lpthread -lsupc++ -lpthread /usr/lib/libSDL.so -lm /usr/lib/libasound.so -ldl -lartsc -lpthread /usr/lib/libesd.so /usr/lib/libaudiofile.so -lm -laudio -lXt -lX11 -lXext /usr/lib/libggi.so /usr/lib/libgii.so /usr/lib/libgg.so -lvga /usr/lib/libaa.so -ldl -lpthread /usr/lib/libmikmod.so -ldl -lm -ldl -lm /usr/lib/libvorbis.so -lm -lm /usr/lib/libvorbisfile.so -lm /usr/lib/libvorbisenc.so -lm /usr/lib/libogg.so -Wl,--rpath -Wl,/usr/kde/3.1/lib collect2: ld terminated with signal 11 [Segmentation fault], core dumped make[2]: *** [playsound] Error 1 make[2]: Leaving directory `/var/tmp/portage/sdl-sound-0.1.5/work/SDL_sound-0.1.5/playsound' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sdl-sound-0.1.5/work/SDL_sound-0.1.5' make: *** [all] Error 2 !!! ERROR: media-libs/sdl-sound-0.1.5 failed. !!! Function src_compile, Line 28, Exitcode 2 !!! (no error message) Expected Results: It should complete the build. Portage 2.0.47-r8 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r0) ================================================================= System uname: 2.4.20-gentoo-r1 i686 AMD Athlon(tm) XP 2000+ GENTOO_MIRRORS=" ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config /opt/quake3/cpma/server.cfg" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg libg++ mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb gtkhtml gdbm berkdb slang readline arts tetex aalib nas bonobo svga ggi tcltk java guile X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk qt kde motif opengl mozilla cdr acpi alsa dvd fbcon sse tiff" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -pipe -mfpmath=sse" CXXFLAGS="-O3 -march=athlon-xp -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -pipe -mfpmath=sse" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
There's already a similar bug report. This apparently corresponds to command line length to the linker. Try to remove all repeating -lpthread etc. commands and see what happens.
turn down your compiler flags
Sorry, I should have mentioned this, but I did turn down my flags before I submitted this. It did not have any effect. I tried: CFLAGS="-O3 -march=athlon-xp -pipe" and CFLAGS="-O1 -pipe" I don't know how to turn it down anymore than that. Personally I think this may be related to the linker command length, but I don't know how to try it without duplicate pthread m etc...
wrangler
Stanislau, any details on the command line length thing?
It was on Gentoo forums, not directly sdl related, but people said that shortening ld command line by removing repeated libraries helped. It appears this is a bug in binutils/ld. Try to upgrade binutils and/or gcc. And see if the problem persists. Goth.. can't find exact thread in forums...
latest binutils does not fix it ... i'm pointing the work of fixing this ld problem at Bug 16577 ... hence the dependency ;)
Yes, SpanKY, this is apparently our guy...
*** This bug has been marked as a duplicate of 16577 ***