Michael.Abshoff on Sun, 09 Sep 2007 18:18:19 +0200


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

ticket #627: pari 2.3.2 build fix for Linux PPC 32 bit


[This is CCed to sage-devel]

Hello folks,

I am a Sage developer who has ported Sage to 32 bit PPC Linux. While doing so I come across the following issue: Linux PPC need -fPIC otherwise pari compiles and links fine, but upon execution we get the following error:

[mabshoff@localhost sage-2.8.4]$ gp
gp: error while loading shared libraries: /tmp/Work/sage-2.8.4/spkg/build/pari-2.3.2.p1/src/Olinux-ppc/libpari-gmp.so.2: R_PPC_REL24 relocation at 0x0fc77278 for symbol `sqrt' out of range

The fix is obvious: add -fPIC to DLCFLAGS for linux-ppc. A path can be found at

http://fsmath.mathematik.uni-dortmund.de/~mabshoff/patches/pari-add_-fPIC_to_DLCFLAGS_for_PPC_Linux.patch

After the patch is applied:

[mabshoff@localhost pari-2.3.2.p1]$ gp
GP/PARI CALCULATOR Version 2.3.2 (released) PowerPC running linux (PPC/GMP-4.2.1 kernel) 32-bit version compiled: Sep 9 2007, gcc-4.1.2 20070502 (Red Hat 4.1.2-12) (readline v5.2 enabled, extended help not available)

Copyright (C) 2000-2006 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

parisize = 4000000, primelimit = 500000
?
Goodbye!

I hope you can merge the patch.

Cheers,

Michael

For the Sage people: I have also updated the Sage.spkg an attached all information to ticket #627 at

http://trac.sagemath.org/sage_trac/ticket/627