------- Comment #5 from gbarnt at student dot dtu dot dk 2009-03-23 17:23 ------- Sadly my skills with bugzilla's haven't improved. I meant to have the following accompany the patch above:
This issue is also present on an x86_64 red hat linux in gcc-4.3.3. Usage of --with-gmp and --with-mpfr does not add the path to the run-time dependencies (see ld's -rpath flag). Configured with --with-gmp=$HOME/softInstall_blades/ --with-mpfr=$HOME/softInstall_blades my x86_64-unknown-linux-gnu/libgcc/config.log (home folder replaced by ~): ~/software/gcc_2build/./gcc/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or direc tory ldd gcc/cc1 yields: libmpfr.so.1 => not found libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x0000003296200000) libc.so.6 => /lib64/libc.so.6 (0x0000003365a00000) /lib64/ld-linux-x86-64.so.2 (0x0000003365600000) Notice that it wrongly located the libgmp in /usr/lib64, when I explicitly asked for it to use the gmp in subdir of my home folder. I do not have root access to this machine (university) so most (read: all) our software is installed in non-standard paths - else I would just have upgraded/installed gmp/mpfr via yum (red hat's package manager) and called it a day. Manually adding LDFLAGS="-Wl,-rpath,[dir]" does not work (it still found the wrong dirs). The "crle" approach is not possible (it is not a sun/solaris machine). Looking at configure.ac (gcc-root folder - line: 1191) the variables set by --with-gmp only adds "-L". Manually appending "-Wl,-rpath,[dir variable]" to the lib-part worked for me, though "-Wl,-R,[dir variable]" is probably more portable (since gnu ld translates -R [dir] into -rpath [dir] and solaris uses -R [dir]). I have not tested if this solution allows [dir variable] to contain spaces. For other users suffering this: modification of configure.ac requires autoconf to update the "configure" script. ~Niels -- gbarnt at student dot dtu dot dk changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gbarnt at student dot dtu | |dot dk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36481