Installing with non-standard prefix fails - please help

Jonathan Wakely jwakely.gcc@gmail.com
Tue Aug 30 12:40:00 GMT 2011


On 30 August 2011 12:43, H_Jarausch wrote:
>
> Hi,
>
> I need to install gcc-4.7-SVN onto a machine where I don't have root access.
> I'd like to install with the  /kurs/cpp prefix. For doing so, I configure
> like
>
> CFLAGS='-L/kurs/cpp/lib' LDFLAGS="-L/kurs/cpp/lib -Wl,-rpath,/kurs/cpp/lib"
> \
>  ./configure --prefix=/kurs/cpp --enable-languages="c++" \
>                  --with-gmp=/kurs/cpp --with-mpfr=/kurs/cpp
> --with-mpc=/kurs/cpp
>
> Still I get a configure error when the new gcclib is built:
> configure:3540: checking for suffix of object files
> configure:3562: /kurs/cpp/Src/gcc-4.7-110729/host-i686-pc-linux-gnu/gcc/xgcc
> -B/kurs/cpp/Src/gcc-4.7-110729/host-i686-pc-linux-gnu/gcc/
> -B/kurs/cpp/i686-pc-linux-gnu/bin/ -B/kurs/cpp/i686-pc-linux-gnu/lib/
> -isystem /kurs/cpp/i686-pc-linux-gnu/include -isystem
> /kurs/cpp/i686-pc-linux-gnu/sys-include    -c -g -L/kurs/cpp/lib  conftest.c
>>&5
> /kurs/cpp/Src/gcc-4.7-110729/host-i686-pc-linux-gnu/gcc/cc1: error while
> loading shared libraries: libmpc.so.2: cannot open shared object file: No
> such file or directory
>
>
> There is a valid symlink  /kurs/cpp/lib/libmpc.so.2 to
> /kurs/cpp/lib/libmpc.so.2.0.0  and ldd /kurs/cpp/lib/libmpc.so.2.0.0 doesn't
> show any problems.
>
> So, what am I missing for building gcc-4.7-SVN in my case.
>
> Many thanks for a hint,

You didn't read the docs for --with-gmp etc. at
http://gcc.gnu.org/install/configure.html

"You might also need to ensure the shared libraries can be found by
the dynamic linker when building and using GCC, for example by setting
the runtime shared library path variable (LD_LIBRARY_PATH on GNU/Linux
and Solaris systems). "

As Marc said, the easiest method is to build gmp/mpfr/mpc with
--disable-shared, or simply to put them in the gcc source tree as
documented at http://gcc.gnu.org/install/prerequisites.html

Also, do not run ./configure, as documented at
http://gcc.gnu.org/install/configure.html

Building GCC is not trivial, but we've tried to document the important
bits, particularly this VERY frequently asked question, so please take
the time to read the documentation.



More information about the Gcc-help mailing list