Bill Allombert on Wed, 21 Jul 2010 14:06:34 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: platform issues


On Wed, Jul 21, 2010 at 12:26:17PM +0100, John Cremona wrote:
> Sorry for the deluge of emails to pari-devel.  The following were
> reported by David Kirkby whose aim include  making sure that all code
> included in Sage satisfies various worthy conditions, one of which is
> to build on Solaris machines.  The following come from discussion
> relating to getting pari-2.4.3 into Sage.

Please note that this report overlap with bug #1078

> 1. "Hi, John or someone else can perhaps convey this to the Pari
> developers. Would it be possible for them to add the -fPIC option on
> at least all Solaris systems. (Both SPARC and x86). If code goes into
> a shared library, it should be compiled position independent. It is
> unreliable if this is not done. There's some relevant information
> about this here.
> 
> http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Code-Gen-Options.html#Code-Gen-Options
> 
> http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Link-Options.html#Link-Options
> 
> I believe it would be more reliable to build with -fPIC when the code
> is going into a shared library - irrespective of the platform. What
> one should ensure though is there is not a mixture of PIC and non-PIC
> code, as that can be unreliable too.
> 
> I've not had a chance to look at the other issues, but as far as I can
> see, this update completely breaks a 64-bit build on Solaris or
> OpenSolaris.

As noted in the buglog, PARI use -fPIC for 64-bit build on Solaris, so this is unrelated.
 
> I've also noticed that Pari reports that readline is not working on
> Solaris systems. Yet the readline is definitely working in my Sage
> builds on Solaris. Several parts of Sage link against readline (Pari,
> gap, Singular, ECL, Python ...). None of them believe that readline is
> broken, but Pari does. "

What exactly happens ?

> 2. "Looking at the error message above:
> 
> ld.so.1: solaris-ix86-rlv23868: fatal: libgmp.so.10: open failed: No
> such file or directory
> ./Configure[79]: .: line 38: 24072: Killed
> 
> and comparing it to the GMP libraries that were installed, the version
> numbers do not match. Pari is looking for libgmp.so.10 but I have the
> following GMP related files:
> 
> drkirkby@hawk:~/sage-4.5/local/lib$ ls -ld libgmp*
> -rwxr-xr-x+  1 drkirkby staff        803 Jul 16 13:10 libgmp.la
> lrwxrwxrwx   1 drkirkby staff         15 Jul 16 13:10 libgmp.so ->
> libgmp.so.3.4.6
> lrwxrwxrwx   1 drkirkby staff         15 Jul 16 13:10 libgmp.so.3 ->
> libgmp.so.3.4.6
> -rwxr-xr-x+  1 drkirkby staff     549536 Jul 16 13:10 libgmp.so.3.4.6
> -rwxr-xr-x+  1 drkirkby staff        919 Jul 16 13:10 libgmpxx.la
> lrwxrwxrwx   1 drkirkby staff         17 Jul 16 13:10 libgmpxx.so ->
> libgmpxx.so.3.1.6
> lrwxrwxrwx   1 drkirkby staff         17 Jul 16 13:10 libgmpxx.so.3 ->
> libgmpxx.so.3.1.6
> -rwxr-xr-x+  1 drkirkby staff      26712 Jul 16 13:10 libgmpxx.so.3.1.6
> 
> i.e. there is nothing like a version 10. The installed libraries have
> a 3.x in them, but Pari is looking for a .10.

libgmp.so.10 is the soname of GMP 5. I really think GMP5 should be changed back to
use the soname libgmp.so.3 since the change does not break the published ABI and the soname
dump is going to cause useless problems to lot of people.

I expect libgmp.so.10 is installed somewhere where PARI looks before sage-4.5/local/lib.

Cheers,
Bill.