public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: eggert@twinsun.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/7978: gcc 3.2 dynamic link path problem on Solaris 8 with g++
Date: Thu, 19 Sep 2002 13:26:00 -0000	[thread overview]
Message-ID: <200209192021.g8JKLbb08029@sic.twinsun.com> (raw)


>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:


             reply	other threads:[~2002-09-19 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-19 13:26 eggert [this message]
2003-01-13  0:46 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200209192021.g8JKLbb08029@sic.twinsun.com \
    --to=eggert@twinsun.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).