On Fri, 27 Aug 2010, Tom Browder wrote:
I have passed to configure the '--with-X=Y' options to where gmp, mpfr, and mpc are installed. I have defined LDFLAGS with the location of their libraries. I have passed the '--with-stage1-ldflags=X' option with the same information. All this, yet I still get a build failure with these messages in the "gcc_build/i686-pc-linux-gnu/libgcc/config.log" (note the build directory is outside the gcc source tree):
[...]
/home/tmb/src/gcc_build/./gcc/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
The --with-* options only tell the compiler where to find the stuff at compile-time, not at runtime (not that they couldn't, but they don't, gcc hates runpaths). For a static library, that's fine. For a shared library in a non-standard location, you need to pass some -rpath flags to the linker, for instance through LDFLAGS (and BOOT_LDFLAGS?). Or use LD_LIBRARY_PATH, but that sucks.
-- Marc Glisse