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: jbuck at synopsys dot COM
- Subject: Re: Shared library annoyance with gcc-3_0-branch
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Fri, 16 Feb 2001 15:50:29 -0500 (EST)
- Cc: gcc at gcc dot gnu dot org, lucier at math dot purdue dot edu, Theodore dot Papadopoulo at sophia dot inria dot fr
What does this imply for the future?
Right now on my alpha I have installed 2.95.1, 2.95.2, the current
gcc-3_0-branch, and a profiled gcc-3_0-branch (and I can give what I
consider to be a reasonable reason to use each of them in different
circumstances). If they were all built with shared libraries that they
didn't know the location of, I'd have to change my LD_LIBRARY_PATH or
reconfigure my applications or change my makefiles by hand each time I
wanted to try to compile something with a different version of gcc?
This doesn't make sense to me.
Is the following suggestion of Theodore Papadopoulo reasonable? I
didn't find a response on the mail list.
> Wouldn't it be possible to allow gcc's installer to specify at
> configure time a -Wl,... flag to be added in the spec file ???
Brad
> From jbuck@mother.synopsys.com Wed Feb 14 15:18:21 2001
>
> 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).