Re: completely unable to get Gcc 4.4.5 to build with local Gmp/Mpfr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 28, 2010 at 01:13:22AM +0000, Jonathan Wakely wrote:
> On 27 December 2010 22:07, Oliver Kullmann wrote:
> > Just as your e-mail came in, I've discovered that myself
> > (reading the make-output :-().
> >
> > There are always so many unknowns in these (unfortunately fully
> > unspecified) builds, one always runs around like a randomised chicken.
> >
> > It runs now much longer as before, so there's hope.
> >
> > Will it actually solve the linking problems by itself (apparently
> > the only possibility is static linking), or does one have to add
> > run-time linker-instructions when running gcc? I hope not (that
> > was the major motivation to do it this way).
> 
> It's entirely possible to link dynamically to libgmp.so and
> libmpfr.so, by installing gmp and mpfr in system library diretories or
> by using --with-gmp and --with-mpfr, but if you do that then you need
> to ensure that those libs will be found at runtime (via ldconfig or
> LD_LIBRARY_PATH or equivalent mechanisms)
>

The problem is the gcc-build itself: LD_LIBRARY_PATH is not honoured for building
of libgfortran (4.2.4) and the other libs which with 4.4.x also need gmp, mpfr.
I also tried other possibilities, to no avail: all information on dynamic linking
paths seems to be blocked for the build of the gcc-libraries.
 
> Which is why I always recommend that people either build gmp and mpfr
> with --disable-shared (so they only get static libs)

Didn't think of that; worth a try.
What I don't understand is that the linking-system is so silly: Either
you have the link-library directly put into the executable, or so link-library
you compile with is just disregarded and a completely new game is opened at run-time:
the most sensible thing would be to store the path to the link-library against which you
compiled it, and to use that at run-time. One can hardcode these things, but only
via linker-flags --- which often (so in the gcc-build) are simply not honoured in
build systems. It should be the compiler which does it automatically.
Must have some historic reason.

> or they put the
> source trees in the gcc tree, which automatically does static linking.

I thought so. Yet I didn't succeed building 4.5.2, but finally I will get there ...

Thanks!

Oliver



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux