Subject: toolchain/33072: linkage fails --- g++: Internal error: Segmentation fault (program ld)
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <tim@electricshoes.com>
List: netbsd-bugs
Date: 03/13/2006 19:55:00
>Number: 33072
>Category: toolchain
>Synopsis: linkage fails --- g++: Internal error: Segmentation fault (program ld)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 13 19:55:00 +0000 2006
>Originator: Tim Larson
>Release: 2.1
>Organization:
>Environment:
NetBSD schroeder 2.1 NetBSD 2.1 (GENERIC) #0: Mon Oct 24 22:13:16 UTC 2005 builds@b2.netbsd.org:/home/builds/ab/netbsd-2-1-RELEASE/mac68k/200510241747Z-obj/home/builds/ab/netbsd-2-1-RELEASE/src/sys/arch/mac68k/compile/GENERIC mac68k
>Description:
During final linking to create executable, ld segfaults. I've compiled numerous other applications and libraries without problem, including all the prereqs for this package. I do not understand what would cause this one to fail, nor do I know where to start looking.
Unix development of this project is primarily on Linux, though there have been successful builds on some other platforms. I've been trying to help work out NetBSD-specific quirks. Mac68k is the only NetBSD platform I have available, so cannot ascertain if this is specific to NetBSD in general or NetBSD/mac68k particularly.
g++ (GCC) 3.3.3 (NetBSD nb3 20040520)
GNU assembler 2.14 20030612
GNU ld version 2.14 20030612
g++ -g -O2 -L/usr/pkg/lib -o alephone shell.o shell_misc.o DefaultStringSets.o CSeries/libcseries.a Expat/libexpat.a Files/libfiles.a GameWorld/libgameworld.a Input/libinput.a Lua/liba1lua.a Misc/libmisc.a ModelView/libmodelview.a Network/libnetwork.a Network/Metaserver/libmetaserver.a Pfhortran/libpfhortran.a RenderMain/librendermain.a RenderOther/librenderother.a Sound/libsound.a XML/libxml.a CSeries/libcseries.a Expat/libexpat.a Files/libfiles.a GameWorld/libgameworld.a Input/libinput.a Lua/liba1lua.a Misc/libmisc.a ModelView/libmodelview.a Network/libnetwork.a Network/Metaserver/libmetaserver.a Pfhortran/libpfhortran.a RenderMain/librendermain.a RenderOther/librenderother.a Sound/libsound.a TCPMess/libtcpmess.a XML/libxml.a -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio -lpthread -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -lm -L/usr/X11R6/lib -lX11 -lXext -L/usr/pkg/lib -laa -lm -L/usr/X11R6/lib -lX11 -lusbhid -lSDL_ima
ge -lSDL_net -lGL -lGLU
g++: Internal error: Segmentation fault (program ld)
Please submit a full bug report.
See <URL:http://www.netbsd.org/Misc/send-pr.html> for instructions.
>How-To-Repeat:
1. Get Marathon "Aleph One" source tarball 20051119 from sf.net and expand, "cd" to this directory.
2. Also install prereqs boost headers, SDL, SDL_net, SDL_image.
3. find . -name "*.h" -print | xargs grep unix
There are three instances - modify sources to check for __NetBSD__ as well, so that compilation can continue. (These checks are going to be committed to CVS for the benefit of NetBSD users.)
4. LDFLAGS="-L/usr/pkg/lib -L/usr/X11R6/lib" CPPFLAGS="-I/usr/pkg/include -I/usr/X11R6/include" ./configure && make
(This works around a shortcoming of the makefiles to include the X11 stuff.)
>Fix: