When emerging blender, gcc reports ld segfaulting. Reproducible: Always Steps to Reproduce: 1. emerge blender # on x86 Actual Results: gcc -shared -Wl,--whole-archive string/.libs/libblender_STR.al ghost/.libs/libblender_GHOST.al guardedalloc/.libs/libblender_guardedalloc.al bmfont/.libs/libblender_BMF.al moto/.libs/libblender_MT.al container/.libs/libblender_CTR.al memutil/.libs/libblender_MEM.al decimation/.libs/libblender_LOD.al keymaker/.libs/libblender_belgium.al bsp/.libs/libblender_BSP.al iksolver/.libs/libblender_IK.al -Wl,--no-whole-archive -L/usr/X11R6/lib string/.libs/libblender_STR.al -L/usr/lib -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread ghost/.libs/libblender_GHOST.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread guardedalloc/.libs/libblender_guardedalloc.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread bmfont/.libs/libblender_BMF.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread moto/.libs/libblender_MT.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread container/.libs/libblender_CTR.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread memutil/.libs/libblender_MEM.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread decimation/.libs/libblender_LOD.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread keymaker/.libs/libblender_belgium.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread bsp/.libs/libblender_BSP.al -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lpthread -lm -lm -lm -lpthread iksolver/.libs/libblender_IK.al -lSM -lICE -lXmu -lXt -lXi -lpthread -lm -lm -lm -lpthread -lpthread -lpthread -lsupc++ -lpthread -lm /usr/lib/libaudiofile.so -lm /usr/lib/libasound.so -lm -lpthread -lXxf86dga /usr/lib/libGLU.so -lGL -lX11 -lXext -lopenal /usr/lib/libvorbisfile.so /usr/lib/libvorbis.so /usr/lib/libogg.so /usr/lib/libesd.so /usr/lib/libsmpeg.so /usr/lib/libSDL.so -lutil -lm /usr/lib/libjpeg.so -lpng -lcrypto -lssl -lpthread -ldl -lstdc++ -lz -Wl,-soname -Wl,libblender_intern.so.0 -o .libs/libblender_intern.so.0.0.0 collect2: ld terminated with signal 11 [Segmentation fault], core dumped make[3]: *** [libblender_intern.la] Error 1 make[3]: Leaving directory `/var/tmp/portage/blender-2.26/work/blender-2.26/intern' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/blender-2.26/work/blender-2.26/intern' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/blender-2.26/work/blender-2.26' make: *** [all] Error 2 Expected Results: Successful merge Portage 2.0.47-r7 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2_pre1-r0) ================================================================= System uname: 2.4.20 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://distro.ibiblio.org/gentoo http://gentoo.oregonstate.edu " CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" 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="/usr/local/portage" USE="x86 oss 3dnow apm avi crypt encode gif jpeg libg++ libwww mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml gdbm berkdb slang readline bonobo java guile mysql X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis gnome gtk opengl mozilla cdr -motif -svga -qt -kde -arts alsa innodb cups ldap" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe" CXXFLAGS="-march=pentium3 -O3 -pipe" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="" AUTOCLEAN="yes" SYNC="rsync://rsync2.us.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
sys-devel/binutils-2.13.90.0.18 *
I will have a look, blender is compiling now. But lookikng at that link line, I am not supprised that ld got it's nickers in a twist, the makefiles for it look very broken with that many -l() arguments. Stefan
I agree the list of libs looks fubar. However, ld should not puke. To clarify, I consider this a ld/binutils bug (thus Core system) being exposed by bad behavior by blender. However, the blocker status relates more to blender than ld. Feel free to reclassify.
I think this is a glibc related error, as ld works fine on my glibc-3.2.1 system, but only dies on glibc-3.2.2_pre1 and latter. Also the gdb backtrace ends in glibc (cannot remember the exact function). Will try to track it down some more. Stefan
I also get a similar behavior with sdl-sound. (reported as bug 16947) There is a long link line with several repeated -l(whatever). I have installed glibc-2.3.2, and binutils-2.13.90.0.18 Hope some of this helps...
This is the backtrace which I get from ld if you give it lots of libraries to link: #0 new_statement (type=lang_group_statement_enum, size=13, list=0xd) at ldlang.c:516 #1 0x080543e6 in lang_enter_group () at ldlang.c:4758 #2 0x08049f34 in yyparse () at ldgram.y:338 #3 0x0805055c in load_symbols (entry=0x0, place=0x0) at ldlang.c:1576 #4 0x08050d2f in open_input_bfds (s=0x0, force=0) at ldlang.c:2043 #5 0x08053b00 in lang_process () at ldlang.c:4277 #6 0x080567e5 in main (argc=0, argv=0x0) at ldmain.c:438 #7 0x4003c747 in __libc_start_main () from /lib/libc.so.6 It seems the new pointer in new_statement gets rubished, I make it 0x7 which is impossible / wrong. (Same result on two machines) Strangely if you don't compile with -g in CFLAGS you get a different (rubbish) backtrace. This is with sys-devel/binutils-2.13.90.0.18 sys-libs/glibc-2.3.2
sys-devel/binutils-2.13.90.0.18-r1 doesn't seem to fix the problem.
Interesting, I get wholly different problems with blender. It builds, but on attempting to run blender as a normal user: $ blender guessing 'blender' == '/usr/bin/blender' Created window Mapped window GHOST_EventPrinter::processEvent, time: 21, type: GHOST_kEventWindowSize GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventWindowSize GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventWindowSize GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventWindowSize GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventWindowSize GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventWindowSize GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventWindowActivate GHOST_EventPrinter::processEvent, time: 114, type: GHOST_kEventCursorMove, (x,y): (585,475) Segmentation fault # emerge info Portage 2.0.46-r12 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r6) ================================================================= System uname: 2.4.19-ipv6-usbdnet i686 AuthenticAMD GENTOO_MIRRORS="http://csociety-ftp.ecn.purdue.edu/pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://gentoo.linux.no/pub/gentoo ftp://ftp.oregonstate.edu/pub/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/kde/3.1/share/config:/usr/share/config" 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 apm avi crypt cups jpeg libg++ mikmod mpeg ncurses quicktime spell xml2 xv berkdb bonobo directfb esd gdbm gif gnome-libs gpm gtkhtml guile imlib java ldap libwww motif mozilla nls opengl pam png python qt readline scanner sdl slang ssl svga tcpd tetex tiff X gtk gtk2 gnome -alsa -arts 3dnow cdr encode kde mmx oggvorbis pdflib perl sse truetype xmms ipv6" COMPILER="" CHOST="i686-pc-linux-gnu" CFLAGS="-march=i686 -O3 -pipe" CXXFLAGS="-march=i686 -O3 -pipe" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j3" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
I have finished a binary search though glibc CVS for this error with the following result; emerge glibc Tue Dec 31 08:29:10 2002: OK Test failed at Tue Dec 31 08:29:10 2002 emerge glibc Tue Dec 31 05:09:25 2002: OK Test passed at Tue Dec 31 05:09:25 2002 emerge glibc Tue Dec 31 06:49:17 2002: OK Test passed at Tue Dec 31 06:49:17 2002 emerge glibc Tue Dec 31 07:39:13 2002: OK Test failed at Tue Dec 31 07:39:13 2002 emerge glibc Tue Dec 31 07:14:15 2002: OK Test failed at Tue Dec 31 07:14:15 2002 Result: interval for patch is [Tue Dec 31 06:49:17 2002,Tue Dec 31 07:14:15 2002] The Test above is that silly link command, ld (-lm -lpthread)*36 times. It either segfaults of issues a warning, a segfault is a fail. Doing cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc -q -z5 rdiff -D "Tue Dec 31 06:49:17 2002" -D "Tue Dec 31 07:14:15 2002" libc password: anoncvs shows that glibc changed some stack code which is causing segfaults in binutils when it attampts to allocate some memory off the stack in binutils-2.13.90.0.18/libiberty/obstack.c and binutils-2.13.90.0.18/include/obstack.h from stat_alloc called by new_statemant in binutils-2.13.90.0.18/ld/ldlang.c. I have emailed binutils & libc-alpha. Anyone wish to add anything? Stefan
I have made a work around, for full details see http://sources.redhat.com/ml/binutils/2003-03/msg00152.html but the short of it is do; mv /usr/lib/libpthread.so /usr/lib/libpthread.so.bak ln -s /lib/libpthread.so.0 /usr/lib/libpthread.so and now it all works. Stefan
*** Bug 16947 has been marked as a duplicate of this bug. ***
I would just like to add that I also get this problem. Portage 2.0.47-r10 (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 1800+ GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/init.d /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 encode gif jpeg libg++ libwww mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline svga java guile X sdl gpm tcpd pam ssl python esd imlib oggvorbis gnome gtk motif opengl aalib alsa -arts bonobo cdr -cups directfb gtkhtml jikes -kde maildir mozilla perl -qt samba sse usb" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -fprefetch-loop-arrays" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -fprefetch-loop-arrays" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
Editing the econf line, and removing '--enable-openal' has fixed the problem for me, can anyone else confirm?
I tried Stefan Jones's workaround, but this is what I get now: ... config.status: executing depfiles commands cd . && /bin/sh /var/tmp/portage/blender-2.26/work/blender-2.26/missing --run autoheader NONE:0: /usr/bin/m4: `unloadmodule' from frozen file not found in builtin table! autom4te-2.57: /usr/bin/m4 failed with exit status: 1 autoheader-2.57: /usr/bin/autom4te failed with exit status: 1 make: *** [config.h.in] Error 1 !!! ERROR: media-gfx/blender-2.26 failed. !!! Function src_compile, Line 319, Exitcode 2 !!! emake failed --------------------------- Note: I had just updated M4 to Rel.1.4
Ok guys, I think I accidentally found the solution for this bug. I had to update the M4 *and* the autoconf packages to their latest releases after updating binutils. Blender compiled and ran just fine in my system now, using GCC 3.2.2! Good luck and Thanks All for the input! Marius
*** Bug 18042 has been marked as a duplicate of this bug. ***
For the record, the following packages should be installed to avoid having this problem. (Perhaps the binutils ebuilds should be updated to depend on specific version of glibc?) =sys-libs/glibc-2.3.2 =sys-devel/binutils-2.13.90.0.20 ___OR____ =sys-libs/glibc-2.3.1-r2 =sys-devel/binutils-2.13.90.0.18
*** Bug 18078 has been marked as a duplicate of this bug. ***
This bug seems to have been fixed for me with sys-devel/binutils-2.13.90.0.20 can anyone confirm this??
I believe binutils-2.13.90.0.20 does fix this.
Tested on two of my systems, closing bug; use sys-devel/binutils-2.13.90.0.20