This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/41760] Problem with configure when using --with-gmp and --with-mpfr



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]