Re: gcc 4.3.2: statically link mpfr?

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

 



Jennifer,

My understanding is that both gmp and mpfr are prerequisites (must be installed) when installing gcc.  The simplest method is to unpack both gmp and mpfr into the unpacked gcc directory.  Here's a 'visual':

This assumes gcc, gmp, mpfr tarballs in same directory.

    $ cd /path/to/gcc/tarball
    $ tar -xjf gcc-<version>.tar.bz2
    $ cd gcc*
    $ tar -xjf ../gmp*
    $ tar -xjf ../mpfr*
    $ mv gmp* gmp
    $ mv mpfr* mpfr

Then run configure and make commands (per installation instructions) to build gcc.

Hope that helped,

Harvey


----- Original Message ----
> From: Jennifer Cranfill <cranfill@xxxxxxxxxxxxxx>
> To: "gcc-help@xxxxxxxxxxx" <gcc-help@xxxxxxxxxxx>
> Sent: Friday, September 19, 2008 1:25:36 PM
> Subject: gcc 4.3.2: statically link mpfr?
> 
> Hi,
> 
> 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?
> 
> 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
> 
> 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 it helps, I'm building with these commands:
> 
> configure  --enable-threads --enable-threads=posix 
> --enable-languages=c,c++,fortran
> 
> make -j2 CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 
> -fno-implicit-templates' bootstrap
> 
> Thanks in advance!
> 
> --
> Jennifer Cranfill


[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