From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 996 invoked by alias); 19 Sep 2002 20:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 976 invoked by uid 71); 19 Sep 2002 20:26:02 -0000 Resent-Date: 19 Sep 2002 20:26:02 -0000 Resent-Message-ID: <20020919202602.975.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, eggert@twinsun.com Received: (qmail 31257 invoked from network); 19 Sep 2002 20:21:51 -0000 Received: from unknown (HELO alcor.twinsun.com) (198.147.65.9) by sources.redhat.com with SMTP; 19 Sep 2002 20:21:51 -0000 Received: from sic.twinsun.com ([192.54.239.17]) by alcor.twinsun.com (8.12.1/8.12.1) with ESMTP id g8JKLbxQ015771 for ; Thu, 19 Sep 2002 13:21:47 -0700 (PDT) Received: (from eggert@localhost) by sic.twinsun.com (8.11.6+Sun/8.11.6) id g8JKLbb08029; Thu, 19 Sep 2002 13:21:37 -0700 (PDT) Message-Id: <200209192021.g8JKLbb08029@sic.twinsun.com> Date: Thu, 19 Sep 2002 13:26:00 -0000 From: eggert@twinsun.com Reply-To: eggert@twinsun.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: c++/7978: gcc 3.2 dynamic link path problem on Solaris 8 with g++ X-SW-Source: 2002-09/txt/msg00584.txt.bz2 List-Id: >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: