Hi, I am still trying to compile gcc 4.7.4 on RH5.9 with my own mpc,mpfr and gmp in non-standard location and now I get this error: "/usr/gmp/lib/libgmp.so: could not read symbols: File in wrong format" The problem is not actually in the libgmp, but in libjava. The libjava got compiled for 32 bits instead of 64 bits, this is the error I get during make: -bash-3.2$ make /bin/sh ../../../libtool --tag=CC --mode=link /home/niko/gcc-4.7.4/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/niko/gcc-4.7.4/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/gcc474/x86_64-unknown-linux-gnu/bin/ -B/usr/gcc474/x86_64-unknown-linux-gnu/lib/ -isystem /usr/gcc474/x86_64-unknown-linux-gnu/include -isystem /usr/gcc474/x86_64-unknown-linux-gnu/sys-include -m32 -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/gmp//include -g -O2 -module -version-info 0:0:0 -no-undefined -L/usr/gmp//lib -lgmp -avoid-version -o libjavamath.la -rpath /usr/gcc474/lib/../lib/gcj-4.7.4-13 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo libtool: link: /home/niko/gcc-4.7.4/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/niko/gcc-4.7.4/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/gcc474/x86_64-unknown-linux-gnu/bin/ -B/usr/gcc474/x86_64-unknown-linux-gnu/lib/ -isystem /usr/gcc474/x86_64-unknown-linux-gnu/include -isystem /usr/gcc474/x86_64-unknown-linux-gnu/sys-include -m32 -shared .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o -Wl,-rpath -Wl,/usr/gmp/lib -Wl,-rpath -Wl,/usr/gmp/lib -L/usr/gmp//lib /usr/gmp/lib/libgmp.so -m32 -Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so /usr/gmp/lib/libgmp.so: could not read symbols: File in wrong format collect2: error: ld returned 1 exit status make: *** [libjavamath.la] Error 1 -bash-3.2$ Note the -m32 option. So I tried to remove this option and manually compile it, but I got another error: -bash-3.2$ /home/niko/gcc-4.7.4/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/niko/gcc-4.7.4/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/gcc474/x86_64-unknown-linux-gnu/bin/ -B/usr/gcc474/x86_64-unknown-linux-gnu/lib/ -isystem /usr/gcc474/x86_64-unknown-linux-gnu/include -isystem /usr/gcc474/x86_64-unknown-linux-gnu/sys-include -shared .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o -Wl,-rpath -Wl,/usr/gmp/lib -Wl,-rpath -Wl,/usr/gmp/lib -L/usr/gmp//lib /usr/gmp/lib/libgmp.so -Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so /usr/bin/ld: warning: i386 architecture of input file `.libs/gnu_java_math_GMP.o' is incompatible with i386:x86-64 output /usr/bin/ld: warning: i386 architecture of input file `../../../native/jni/classpath/.libs/jcl.o' is incompatible with i386:x86-64 output -bash-3.2$ ls -l .libs/gnu_java_math_GMP.o -rw-rw-r-- 1 niko niko 69068 Jul 1 07:56 .libs/gnu_java_math_GMP.o -bash-3.2$ file .libs/gnu_java_math_GMP.o .libs/gnu_java_math_GMP.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped -bash-3.2$ So, how is it possible that libjava went into 32 bits while everything else in 64 ? -bash-3.2$ file /usr/gmp/lib/libgmp.so.10.2.0 /usr/gmp/lib/libgmp.so.10.2.0: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped -bash-3.2$ file /usr/mpfr/lib/libmpfr.so.4.1.2 /usr/mpfr/lib/libmpfr.so.4.1.2: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped -bash-3.2$ file /usr/mpc/lib/libmpc.so.3.0.0 /usr/mpc/lib/libmpc.so.3.0.0: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped -bash-3.2$ How should i fix this ? TIA Nulik