This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/41760] Problem with configure when using --with-gmp and --with-mpfr
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2009 07:51:02 -0000
- Subject: [Bug libfortran/41760] Problem with configure when using --with-gmp and --with-mpfr
- References: <bug-41760-11765@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2009-10-20 07:51 -------
Disclaimer: I do not know what ./configure does with regards to library search
paths.
> --with-mpfr=/usr/local
> /usr/lib/libmpfr.so.1: undefined symbol: __gmp_get_memory_functions
Seemingly, the /usr/lib and not the /usr/local/lib version is used. Frankly, I
do not know how exactly --with-mpfr works, but I think the path is only used
for compiling and not for running the compiled programs.
Thus when running "gfortran" (which happens when building the libgfortran
library), the wrong shared library is picked up.
Does setting the LD_LIBRARY_PATH help? I mean:
if [ -z "$LD_LIBRARY_PATH" ]; then
LD_LIBRARY_PATH=/usr/local/lib
else
LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
fi
export LD_LIBRARY_PATH
At least in case of the finally installed version you need to set
LD_LIBRARY_PATH - otherwise you have the same problem: The wrong library is
picked up.
Though, I am surprised that /usr/lib is used; I think most linux distributions
set /etc/ld.so.conf such that /usr/local/lib comes before /usr/lib. If you have
newly installed the GMP/MPFR in /usr/local/lib, maybe running
ldconfig
helps?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41760