public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7978: gcc 3.2 dynamic link path problem on Solaris 8 with g++
@ 2002-09-19 13:26 eggert
0 siblings, 0 replies; 2+ messages in thread
From: eggert @ 2002-09-19 13:26 UTC (permalink / raw)
To: gcc-gnats
>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
>Closed-Date:
>Last-Modified:
>Originator: Paul Eggert
>Release: 3.2
>Organization:
Twin Sun, Inc.
>Environment:
Solaris 8 (sparc).
System: SunOS sic.twinsun.com 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
>Description:
The "g++" command creates an executable that does not run due to
a run-time link path problem.
>How-To-Repeat:
$ echo 'int main (void) { return 0; }' >test.cc
$ g++ test.cc
$ ./a.out
ld.so.1: ./a.out: fatal: libstdc++.so.5: open failed: No such file or directory
Killed
$ ldd a.out
libstdc++.so.5 => (file not found)
libm.so.1 => /usr/lib/libm.so.1
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1
$ g++ -v test.cc
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 test.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase test.cc -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:
/tmp/prefix/include/c++/3.2
/tmp/prefix/include/c++/3.2/sparc-sun-solaris2.8
/tmp/prefix/include/c++/3.2/backward
/tmp/prefix/include
/tmp/prefix/lib/gcc-lib/sparc-sun-solaris2.8/3.2/include
/usr/include
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
>Fix:
g++ automatically appends -L options to the collect2 command, to
help the linker find libstdc++.so.5 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".
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/7978: gcc 3.2 dynamic link path problem on Solaris 8 with g++
@ 2003-01-13 0:46 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-01-13 0:46 UTC (permalink / raw)
To: eggert, gcc-bugs, gcc-prs, nobody
Synopsis: gcc 3.2 dynamic link path problem on Solaris 8 with g++
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Sun Jan 12 16:46:52 2003
State-Changed-Why:
This is the documented behavior. The change for this has been
discussed at length, although I admit that I personally don't
like the conclusion as well.
You have to set LD_LIBRARY_PATH accordingly.
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7978
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-13 0:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19 13:26 c++/7978: gcc 3.2 dynamic link path problem on Solaris 8 with g++ eggert
2003-01-13 0:46 bangerth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).