I'm trying to build GCC 4.6 under CentOS release 5.5 (Final). I've freshly built GMP-5.0.1, MPC-0.9, and MPFR-3.0.1, and have used the following configure command:
../configure --prefix=/users/xxxx/apps/mygcc4.6 --disable-checking --enable-threads=posix --enable-languages=c,c++,fortran --with-mpfr=/users/xxxx/code/gcc/mpfr-3.0.1-install-cyprus --with-gmp=/users/xxxx/code/gcc/gmp-5.0.1-install-cyprus --with-mpc=/users/xxxx/code/gcc/mpc-0.9-install-cyprus
After this, I run make and after about 5 minutes get the following error message:
checking for suffix of object files... configure: error: in /users/xxxx/code/gcc/gcc-4.6.0/obj/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See
config.log' for more details.
The config.log indicates that a recently generated program (cc1) is involved:
/users/xxxx/code/gcc/gcc-4.6.0/obj/./gcc/cc1
Indeed if I run this program with no arguments I get the same error message found in config.log:
error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
However, libmpfr.so.4 is in the lib subdirectory of that provided to configure using the --with-mpfr flag, as seen above. I have LD_LIBRARY_PATH and LIBRARY_PATH empty. Any idea how I can get past this error?