This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 4.3.2: statically link mpfr?
- From: Brian Dessent <brian at dessent dot net>
- To: Jennifer Cranfill <cranfill at imageworks dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 19 Sep 2008 10:39:14 -0700
- Subject: Re: gcc 4.3.2: statically link mpfr?
- References: <48D3E090.1000907@imageworks.com>
- Reply-to: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
Jennifer Cranfill wrote:
> According to the gcc prerequisites, mpfr >= 2.3.0 is required to build
> GCC. I'm wondering if the mpfr libraries also have to be installed to
> run gcc 4.3.2?
Yes.
> I get this error when I try to use it on a machine that does not have
> the latest mpfr:
> /opt/gcc432m64/bin/g++ hello.cpp
> /opt/gcc432m64/libexec/gcc/x86_64-unknown-linux-gnu/4.3.2/cc1plus: error
> while loading shared libraries: libmpfr.so.1: cannot open shared object
> file: No such file or directory
You probably just need to set LD_LIBRARY_PATH to include the place where
you installed mpfr and gmp if it's not in the system default.
> Is it possible to statically link mpfr into ccplus? I tried configure
> with --disable-shared, that did not change the error. Do I just need to
> change something in the Makefile?
If you want that, then don't build gmp and mpfr as shared libraries,
i.e. configure them with --disable-shared, not gcc. Or if you do a
combined-tree style build then --disable-shared is automatically added
to their configures.
Brian