|Bill Allombert on Fri, 28 Sep 2007 22:25:40 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: ticket #627: pari 2.3.2 build fix for Linux PPC 32 bit|
On Fri, Sep 28, 2007 at 12:56:18AM +0200, Michael.Abshoff wrote: > Bill Allombert wrote: > > Hello Bill, folks, > >>>[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 > > > >Well I cannot reproduce this issue with either binutils 2.15 or > >binutils 2.17 on debian-ppc, but this might have changed with newer > >versions, > >like on alpha. Which distribution and release of binutils are you using ? > > > > Fedora Core 7, all current patches applied. Binutils ought to be > > ld -v > GNU ld version 184.108.40.206.12-4 20070128 > > but I cannot check on the specific box I build due to lack of access (I > am on the road). I would speculate that Debian's gcc or binutils package > might be patched to force -fPIC on PPC because as far as I know it is > mandatory on PPC. I checked that Debian gcc does not force -fPIC on PPC and -fPIC is certainly not mandatory on PPC. So either Fedora apply some security patches that make -fPIC mandatory (this is probable) or newer binutils require it. In any case I proposed to Karim to use -fPIC on all non-x86 platform but he had reservations so instead I checked every available platforms to see whether -fPIC was mandatory (on Debian GNU/linux only) The results were: -fPIC mandatory: hppa ia64 arm amd64 sparc64 -fPIC not mandatory: x86 sparc32 ppc s390 mips alpha m68k Since that date, -fPIC has moved from "not mandatory" to "mandatory" on alpha and m68k. Maybe ppc is the next one. I did not try linux-ppc64. > At least the Cygwin gcc does so (-fPIC is mandatory on > Windows) and that certainly isn't the default behavior on x86. > > >We should adress the issue for non-Linux system using binutils as well. > > > > Sure, I would assume that means AIX? Rather NetBSD/FreeBSD/OpenBSD. Cheers, Bill.