This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

Problem executing gcc3 generated programs on Solaris2.7



Hi,
for some month now I have not been able to actually execute programs
generated by gcc3 snapshots installed in locally in my homedir. This is
due to the fact that libstdc++ is now shared and goes away if I use
-static. The symptoms are that libstdc++.3 is not found, strange enough:

-----> cat a.cc
#include <iostream>
int main () {
  std::cout << "hello world!" << std::endl;
};

-----> which c++
/home/people/wolf/Config/gcc-ss-sun/bin/c++

-----> c++ -v
Reading specs from /home/people/wolf/Config/gcc-ss-sun/lib/gcc-lib/sparc-sun-solaris2.7/3.0/specs
Configured with: ../gcc/configure --prefix=/home/people/wolf/Config/gcc-ss-sun --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 3.0 20010514 (prerelease)

-----> c++ a.cc -o a.out

-----> ldd a.out
        libstdc++.so.3 =>        /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++.so.3
        libm.so.1 =>     /usr/lib/libm.so.1
        libgcc_s.so.0 =>         /home/atlas2/wolf/Config/gcc-ss-sun/lib/libgcc_s.so.0
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        /usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1

-----> ./a.out
Bus Error

-----> gdb a.out
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...(no debugging symbols found)...
(gdb) r
Starting program: /home/atlas2/wolf/program/ydeal/deal.II/-----/a.out 
ld.so.1: /home/atlas2/wolf/program/ydeal/deal.II/-----/a.out: fatal: libstdc++.so.3: open failed: No such file or directory

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb) q

-----> echo $LD_LIBRARY_PATH
.:/home/atlas2/wolf/Config/gcc-ss-sun/lib:/usr/lib:/usr/openwin/lib:/usr/local/lib:/usr/dt/lib:/opt/SUNWspro/lib:/usr/local/xanim/mods:/usr/local/kde/lib:/usr/local/qt/lib:/usr/local/gimp/lib:/usr/ucblib:/usr/local/kde/lib:/usr/local/kde/lib

-----> ls -l /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++*
-rw-r--r--   1 wolf     deal     4883802 May 15 12:48 /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++.a
-rwxr-xr-x   1 wolf     deal        1175 May 15 12:48 /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++.la
lrwxrwxrwx   1 wolf     deal          18 May 15 12:48 /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++.so -> libstdc++.so.3.0.0
lrwxrwxrwx   1 wolf     deal          18 May 15 12:48 /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++.so.3 -> libstdc++.so.3.0.0
-rwxr-xr-x   1 wolf     deal     2046681 May 15 12:48 /home/atlas2/wolf/Config/gcc-ss-sun/lib/libstdc++.so.3.0.0


In other words: libstdc++ is in LD_LIBRARY_PATH, which would however
not even be necessary since it is linked in by global path name. Does
anyone have a clue about what is going on here?

Regards
  Wolfgang


PS: Configure was called as this: 
../gcc/configure
  --host=sparc-sun-solaris2.7
  --prefix=/home/people/wolf/Config/gcc-ss-sun --with-gnu-as
  --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld


-------------------------------------------------------------------------
Wolfgang Bangerth          email: wolfgang.bangerth@iwr.uni-heidelberg.de
                             www: http://gaia.iwr.uni-heidelberg.de/~wolf



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