[Fwd: Pure static build of gcc, gfortran?]
John R. Cary
cary@txcorp.com
Wed Dec 17 19:56:00 GMT 2008
I am trying to build gcc purely static, in particular so that it
need not have to find the mpfr and gmp libs, which it
seems not to find. I have tried a number of configure
lines. In preparation, I build gmp with:
../gmp-4.2.4/configure --prefix=/d/facets/contrib/gcc-4.3.1-jrc \
--enable-static --disable-shared \
--libdir=/d/facets/contrib/gcc-4.3.1-jrc/lib64 CC=/usr/bin/gcc
then mpfr with
../mpfr-2.3.2/configure --prefix=/d/facets/contrib/gcc-4.3.1-jrc \
--enable-static --disable-shared \
--libdir=/d/facets/contrib/gcc-4.3.1-jrc/lib64 \
--with-gmp=/d/facets/contrib/gcc-4.3.1-jrc \
--with-gmp-lib=/d/facets/contrib/gcc-4.3.1-jrc/lib64 \
CC=/usr/bin/gcc \
LDFLAGS=-Wl,-rpath,/d/facets/contrib/gcc-4.3.1-jrc/lib64
and finally gcc with
../gcc-4.3.1/configure \
--prefix=/d/facets/contrib/gcc-4.3.1-jrc \
--enable-static --disable-shared \
--libdir=/d/facets/contrib/gcc-4.3.1-jrc/lib64 \
--with-gmp-include=/d/facets/contrib/gcc-4.3.1-jrc/include \
--with-gmp-lib=/d/facets/contrib/gcc-4.3.1-jrc/lib64 \
--with-mpfr-include=/d/facets/contrib/gcc-4.3.1-jrc/include \
--with-mpfr-lib=/d/facets/contrib/gcc-4.3.1-jrc/lib64 \
--enable-languages=c,fortran,c++ \
CC=/usr/bin/gcc \
LDFLAGS=-Wl,-rpath,/d/facets/contrib/gcc-4.3.1-jrc/lib64
but still I get
/data/d/facets/contrib/gcc-4.3.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.1/cc1plus:
error while loading shared libraries: libmpfr.so.1: cannot open shared
object file: No such file or directory
also:
ldd
/data/d/facets/contrib/gcc-4.3.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.1/cc1plus
libmpfr.so.1 => not found
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x000000303b100000)
libc.so.6 => /lib64/tls/libc.so.6 (0x000000303a800000)
/lib64/ld-linux-x86-64.so.2 (0x000000303a600000
even gmp does not point to the one I built and thought I configured against.
Help much appreciated.
(I do not have root access on the systems in question, and
the goal is to eliminate the need to change user environments.)
More information about the Gcc-help
mailing list