clinuxgccbuild

Trouble building gcc-4.3.4 in a non-standard location


I need to build gcc-4.3.4 in a non-standard location (NFS mounted). I configured:

../gcc-4.3.4/configure --prefix={install dir} --with-gmp={install dir} --with-mpfr={install dir} --with-local-prefix={install dir} --disable-shared

I ran make -j1. But I keep getting:

checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile

In x86_64-unknown-linux-gnu/libgcc/config.log, I can see:

/home/panthdev/apps/gcc-4.3.4-compliant/compiler/objdir/./gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory

libmpfr.so.1 is there in {install dir}/lib. Also if I set LD_LIBRARY_PATH to {install dir}/lib, then it finds the libmpfr.so.1 but config.log starts complaining:

/tmp/cce9YhFK.s: Assembler messages:
/tmp/cce9YhFK.s:16: Error: bad register name `%rbp'
/tmp/cce9YhFK.s:18: Error: bad register name `%rsp'

Solution

  • As I read here you have 32bit binutils where as gcc is trying to do a 64bit build. Make sure your binutils & gcc has the same configuration.