Error when building GCC 4.7.1 on hppa2.0-unknown-linux-gnu

Vincent Lefevre vincent+gcc@vinc17.org
Thu Jul 5 14:53:00 GMT 2012


On 2012-07-05 13:37:11 +0100, Jonathan Wakely wrote:
> On 5 July 2012 13:21, Vincent Lefevre wrote:
> > On 2012-07-05 15:07:53 +0300, Kai Ruottu wrote:
> >> The '--with-*' options only advice the compile time linker to find
> >> the right libraries but don't do anything for the runtime
> >> situation...
> >
> > Ah, OK. Why isn't this fixed, e.g. by adding --with-* paths to
> > the runpath of the generated executables needed for the build?
> 
> The --with-xxx options only affect -I and -L
> 
> GCC never adds runpaths to executables by default.  This is also a FAQ:
> http://gcc.gnu.org/faq.html#rpath

No, this FAQ covers the executables that are generated for the user
by the build (e.g. when the user runs the gcc command), not those
used for the build.

For instance, to build MPFR when using --with-gmp=GMP_DIR, setting
LD_LIBRARY_PATH is not necessary for the build and "make check".
But after installing MPFR, if the user wants to use it and that
GMP can be found in GMP_DIR, the user may need to set up
LD_LIBRARY_PATH.

> > I'd say that the goal of the --with-* options is to provide the
> > paths when they are not in the default environment (including
> > the runtime linker).
> 
> What if the location of those libs during bootstrap is not the same as
> the location will be when the installed compiler is used?

Doesn't LD_LIBRARY_PATH have the precedence? Or if the locations
of the libraries have definitely changed, can't the user update
the rpath with a utility like chrpath?

> The docs at http://gcc.gnu.org/install/configure.html do tell you this
> might be necessary:
> 
> "You might also need to ensure the shared libraries can be found by
> the dynamic linker when building and using GCC, for example by setting
> the runtime shared library path variable (LD_LIBRARY_PATH on GNU/Linux
> and Solaris systems)."

Hmmm... yes, sorry, I think I had read that too fast.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the Gcc-help mailing list