This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/7978: gcc 3.2 dynamic link path problem on Solaris 8 with g++

>Number:         7978
>Category:       c++
>Synopsis:       gcc 3.2 dynamic link path problem on Solaris 8 with g++
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 19 13:26:01 PDT 2002
>Originator:     Paul Eggert
>Release:        3.2
Twin Sun, Inc.
Solaris 8 (sparc).
System: SunOS 5.8 Generic_108528-16 sun4u sparc SUNW,UltraSPARC-IIi-Engine
Architecture: sun4

host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: ../gcc-3.2/configure --disable-nls --enable-languages=c,c++ --prefix=/tmp/prefix --with-system-zlib
	The "g++" command creates an executable that does not run due to
	a run-time link path problem.
	$ echo 'int main (void) { return 0; }' >
	$ g++
	$ ./a.out ./a.out: fatal: open failed: No such file or directory
	$ ldd a.out =>	 (file not found) =>	 /usr/lib/ =>	 /usr/lib/ =>	 /usr/lib/ =>	 /usr/lib/
	$ g++ -v
	Reading specs from /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/specs
	Configured with: ../gcc-3.2/configure --disable-nls --enable-languages=c,c++ --prefix=/tmp/prefix --with-system-zlib
	Thread model: posix
	gcc version 3.2
	 /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase -version -o /tmp/ccGvtOqb.s
	GNU CPP version 3.2 (cpplib) (sparc ELF)
	GNU C++ version 3.2 (sparc-sun-solaris2.8)
		compiled by GNU C version 3.2.
	ignoring nonexistent directory "/usr/local/include"
	ignoring nonexistent directory "/tmp/prefix/sparc-sun-solaris2.8/include"
	#include "..." search starts here:
	#include <...> search starts here:
	End of search list.
	 /usr/ccs/bin/as -V -Qy -s -o /tmp/ccZQywic.o /tmp/ccGvtOqb.s
	/usr/ccs/bin/as: Sun WorkShop 6 99/08/18
	 /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/crt1.o /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/crti.o /usr/ccs/lib/values-Xa.o /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/crtbegin.o -L/tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/../../.. /tmp/ccZQywic.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc -lc /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/crtend.o /tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/crtn.o
	ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.275

	g++ automatically appends -L options to the collect2 command, to
	help the linker find at link-time.  It should also
	append -R options, so that the dynamic linker can find it too.

	A workaround is to use "g++ -static".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]