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 28 December 2010 12:31, Oliver Kullmann wrote:
>
> 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.

It should be. Are you sure you're exporting LD_LIBRARY_PATH so child
processes pick it up?

I used to build multiple versions of GCC for multiple operating
systems and multiple processor architectures, and it's quite possible
to do so with dependencies on libgmp.so and libmpfr.so

But, it's a lot easier to not have dynamic deps, which can be done by
putting the gmp and mpfr sources under the gcc sources (renaming
gmp-x.y.z to simply gmp, and mpfr-x.y.z to mpfr), or by not installing
the shared libs so they can't be linked to.  I prefer to just put the
sources in the gcc source tree.

> 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.

Read the FAQ:
http://gcc.gnu.org/faq.html#rpath

You can pass linker flags to the gcc build, you just don't use
LDFLAGS.  With gcc 4.5 and later it's --with-boot-ldflags, I'm not
sure what the right trick is for gcc 4.4, maybe LDFLAGS_FOR_BUILD or
LDFLAGS_FOR_TARGET

>> 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 ...

But what you showed in your first mail was wrong, you had the archives
in the source tree, then you had the extracted sources in the wrong
place.  Fix that and it'll work.  Or use my gcc-config.mk makefile,
which I wrote specifically to help people who are struggling with the
gmp/mpfr/mpc dependencies, because this is such a common question.


[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