I've been setting up a Debian box to do builds on, and make bootstrap on mainline is failing somewhere in the middle of Stage 1. The problem appears to be that it's not looking in the right places for libgmp.so.3 when it calls ./gcc/xgcc at the end of the stage.

-----

The box, for what it's worth, is an out-of-the-box Debian Stable, with the latest GMP and fully-patched MPFR built by hand and installed in /usr/local/lib:

~/build-trunk> ls /usr/local/lib
firmware libgmp.a libgmp.la libgmp.so libgmp.so.3 libgmp.so.3.4.1 libmpfr.a libmpfr.la

I used the following configure line:

~/build-trunk> ../svn-source/configure --verbose --prefix=/home/brooks/gcc-trunk --enable-languages=c,c++,fortran --with-gmp=/usr/local --with-mpfr=/usr/local

This appears to work quite well for a while; configure finds the mpfr and gmp libraries, and is quite happy with them. However, a good ways into the build, it fails on the following error (with a few messages quoted before that for context):

gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../svn-source/gcc -I../../svn-source/gcc/. -I../../svn-source/gcc/../include -I../../svn-source/gcc/../libcpp/include -I/usr/local/include -I/usr/local/include -I../../svn-source/gcc/../libdecnumber -I../libdecnumber ../../svn-source/gcc/cppspec.c -o cppspec.o gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -o cpp gcc.o opts-common.o gcc-options.o cppspec.o \ intl.o prefix.o version.o driver-i386.o ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/usr/local/lib -L/usr/local/lib -lmpfr -lgmp /home/brooks/build-trunk/./gcc/xgcc -B/home/brooks/build-trunk/./gcc/ -B/home/brooks/gcc-trunk/i686-pc-linux-gnu/bin/ -B/home/brooks/gcc-trunk/i686-pc-linux-gnu/lib/ -isystem /home/brooks/gcc-trunk/i686-pc-linux-gnu/include -isystem /home/brooks/gcc-trunk/i686-pc-linux-gnu/sys-include -dumpspecs > tmp-specs /home/brooks/build-trunk/./gcc/xgcc: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
make[3]: *** [specs] Error 127
make[3]: Leaving directory `/home/brooks/build-trunk/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/brooks/build-trunk'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/brooks/build-trunk'
make: *** [bootstrap] Error 2

I'm not really sure what to make of this; libgmp.so.3 most certainly exists in the specified directory, configure had no problem finding the relevant files, and the line immediately before the one that fails has a -lgmp -lmpfr on it that works fine.

However, there's a workaround: if I copy libgmp.so.3 into /lib, then the build works. (Or, at least, it gets to Stage 2; it's still going....)

It shouldn't be doing that, yes?

- Brooks

Reply via email to