This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Shared library annoyance with gcc-3_0-branch
- To: lucier at math dot purdue dot edu (Brad Lucier)
- Subject: Re: Shared library annoyance with gcc-3_0-branch
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Wed, 14 Feb 2001 12:18:10 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
Brad Lucier writes:
> ../../../gsc/gsc: error in loading shared libraries: libgcc_s.so.0: cannot open shared object file: No such file or directory
>
> This goes away when I add /export/u10/egcs-test/lib (gcc was installed
> with prefix /export/u10/egcs-test) to my LD_LIBRARY_PATH.
> So, are you expecting gcc to be installed in standard places now, or
> are you expecting people to know about LD_LIBRARY_PATH to use the new
> gcc, or is this just a bust?
For C++, it has always been this way, and this should not be surprising.
Since the compiler does not "wire in" the path by default, shared libraries
must be in the standard shared library search path, or in LD_LIBRARY_PATH
for OSes that use that variable.
The only alternatives are: wire in the path, then you can't give your
binary to anyone who doesn't have /export/u10/egcs-test/lib on their
system, go back to a static libgcc, or the present option.
You could put -R/export/u10/egcs-test/lib on some OSes, or
-Wl,-R/export/u10/egcs-test/lib on others. (I think that -R
should be usable on all OSes that support the concept of wired
in search path, but I lost that battle).