libgmp problem

60 views
Skip to first unread message

John Cremona

unread,
May 21, 2013, 9:01:26 AM5/21/13
to SAGE devel
This is something which hit me when I built sage-5.10.beta4 but it is
not specific to that release.

I upgraded my systems's version of mpir, mpfr, flint and ntl, and
installed them all in /usr/local/. When building mpir I use the
--enable-gmpcompat option so that the library which gets inslatted
into /usr/local/lib is called libgmp. Then I have to do something
slightly complicated when building mpfr (following intructions in
mpfr's INSTALL file) as otherwise it will find the older gmp in
/usr/lib and that will not work.

After doing all the above, successfully (for example I can configure
and build eclib using all those newly installed components) I found I
could not build Sage without setting LD_LIBRARY_PATH to
/usr/local/lib, otherwise it almost immediately gives up saying that
it cannot find libgmp.

Did I do something wrong?

John

Jeroen Demeyer

unread,
May 21, 2013, 9:47:08 AM5/21/13
to sage-...@googlegroups.com
Did you by chance build GCC with that new libgmp/libmpfr?

Please provide exact error messages, relevant log files, ...

Jeroen Demeyer

unread,
May 21, 2013, 10:47:54 AM5/21/13
to sage-...@googlegroups.com
I am assuming this is on fermat.

The problem seems to be that libmpfr.so.4 is found in /usr/local/lib,
but that libgmp.so.11 which also lives in /usr/local/lib, is not found:

jdemeyer@fermat:~$ ldd /usr/lib/gcc/x86_64-linux-gnu/4.6/cc1
linux-vdso.so.1 => (0x00007fff55c41000)
libmpc.so.2 => /usr/lib/x86_64-linux-gnu/libmpc.so.2
(0x00007fb127dbc000)
libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00007fb127b61000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10
(0x00007fb1278f2000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb1276ee000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb1274d7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb127117000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb127fe7000)
libgmp.so.11 => not found

This is because /usr/local/lib/libmpfr.so.4 is in the ld.so.cache but
/usr/local/lib/libgmp.so.11 is not. I don't know why this is the case.

jdemeyer@fermat:~$ ldconfig -p |grep libgmp
libgmpxx.so.4 (libc6,x86-64) =>
/usr/lib/x86_64-linux-gnu/libgmpxx.so.4
libgmpxx.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmpxx.so
libgmp.so.10 (libc6,x86-64) =>
/usr/lib/x86_64-linux-gnu/libgmp.so.10
libgmp.so.3 (libc6,x86-64) => /usr/lib/libgmp.so.3
libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
jdemeyer@fermat:~$ ldconfig -p |grep libmpfr
libmpfrcx.so.1 (libc6,x86-64) => /usr/local/lib/libmpfrcx.so.1
libmpfrcx.so (libc6,x86-64) => /usr/local/lib/libmpfrcx.so
libmpfr.so.4 (libc6,x86-64) => /usr/local/lib/libmpfr.so.4
libmpfr.so.4 (libc6,x86-64) =>
/usr/lib/x86_64-linux-gnu/libmpfr.so.4
libmpfr.so.1 (libc6,x86-64) => /usr/lib/libmpfr.so.1
libmpfr.so (libc6,x86-64) => /usr/local/lib/libmpfr.so
libmpfr.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libmpfr.so

Jeroen Demeyer

unread,
May 21, 2013, 10:49:58 AM5/21/13
to sage-...@googlegroups.com
On 05/21/2013 03:01 PM, John Cremona wrote:
> Then I have to do something slightly complicated

Did that "something complicated" involve running ldconfig?

John Cremona

unread,
May 21, 2013, 11:28:14 AM5/21/13
to SAGE devel
On 21 May 2013 15:49, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
> On 05/21/2013 03:01 PM, John Cremona wrote:
>>
>> Then I have to do something slightly complicated

No -- is that what I am missing? If so I can do that.

Sorry I missed the follow-up to my brief enquiry, I was called away
and just pressed send. You are right about the machine this is on.

John

>
>
> Did that "something complicated" involve running ldconfig?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages