This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dynamically linking against GMP and MPFR
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: ghazi at caip dot rutgers dot edu, gcc at gcc dot gnu dot org
- Date: Fri, 25 May 2007 07:37:48 -0700
- Subject: Re: Dynamically linking against GMP and MPFR
- References: <m3sl9lat9s.fsf@localhost.localdomain>
On Fri, May 25, 2007 at 07:10:23AM -0700, Ian Lance Taylor wrote:
> I just noticed a problem with our use of GMP and MPFR. If you
> carefully install the appropriate versions of GMP and MPFR on one
> machine in the normal way, and build gcc on that machine,
> cc1/cc1plus/etc. wind up dynamically linked against libgmp.so and
> libmpfr.so. If you then copy the compiler to some other system, or
> simply run it from another system via NFS, and you have not carefully
> installed the appropriate versions of GMP and MPFR on that other
> system, the compiler will fail to start, getting an error from the
> dynamic linker.
>
> We need a configure time option to link statically against GMP and
> MPFR even if dynamic versions of the libraries are available.
>
I have been doing it ever since gmp was introduced. Otherwise,
my gcc binaries aren't very useful as you have discovered.
H.J.