Opened 11 years ago

Closed 3 years ago

#9990 closed defect (wontfix)

Pari fails to build on AIX

Reported by: drkirkby Owned by: drkirkby
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: porting: AIX or HP-UX Keywords:
Cc: jdemeyer Merged in:
Authors: Reviewers:
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by drkirkby)

The Pari svn snapshot 12577 is failing to build properly on AIX. If the Pari developers would like access to AIX hardware (I don't think they have it), then I can provide access to my personal RS/6000

Reported upstream: http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1102

Hardware and software

  • IBM RS/6000 7025 F50
  • 4 x 332 MHz 32-bit PowerPC CPUs
  • 3 GB RAM
  • A fairly wide mixture of disks sizes (3 x 9 GB, 1 x 18 GB, 2 x 36 GB and 1 x 73 GB)
  • DDS-4 tape drive
  • AIX 5.3 (A POSIX certified operating system)
  • gcc 4.2.4 downloaded from pware
  • sage-4.6.alpha1 with Pari svn snapshot 12577, with some fixes applied in Sage.

The Problem

A full build log is attached, but here is the end which show the failure.

gcc  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -O3 -g   -I. -I../src/headers -fPIC -o thue.o ../src/modules/thue.c
gcc  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -O3 -g   -I. -I../src/headers -I../src/graph -o gp_init.o ../src/gp/gp_init.c
gcc  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -O3 -g   -I. -I../src/headers -DDL_DFLT_NAME=NULL -o highlvl.o ../src/gp/highlvl.c
rm -f libpari-gmp-2.4.so.3.0.0
gcc  -o "/home/users/drkirkby/sage-4.6.alpha1/spkg/build/pari-2.4.3.svn-12577.p5/src/Oaix-ppc"/libpari-gmp-2.4.so.3.0.0 -shared  -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -O3 -g   -fP
IC -Wl,-r  mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o arith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bibli1.o bibli2.o
bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellanal.o elliptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o lll.o perm.o polarit1.o polarit2.o polarit3.o prime.o random.o rootpol.o s
ubcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat.o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnum.o members.o pariinl.o parse.o sumiter.o DedekZeta.o Hensel.o QX_fact
or.o aprcl.o elldata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o mpqs.o nffactor.o part.o stark.o subfield.o thue.o  -L/home/users/drkirkby/sage-4.6.alpha1/local/lib -lgmp
if test "libpari-gmp-2.4.so.3.0.0" != "libpari.so"; then          rm -f libpari.so;       ln -s libpari-gmp-2.4.so.3.0.0 libpari.so; fi
if test "libpari-gmp-2.4.so.3.0.0" != "libpari-gmp-2.4.so.3"; then        rm -f libpari-gmp-2.4.so.3;     ln -s libpari-gmp-2.4.so.3.0.0 libpari-gmp-2.4.so.3; fi
rm -f gp-dyn
gcc  -o gp-dyn -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -O3 -g   -Wl,-brtl  gp.o gp_init.o gp_rl.o highlvl.o whatnow.o plotport.o plotnull.o  -L"/home/users/drkirkby/sage-4.6.alpha1/
spkg/build/pari-2.4.3.svn-12577.p5/src/Oaix-ppc" -L/home/users/drkirkby/sage-4.6.alpha1/local/lib -lreadline -L/home/users/drkirkby/sage-4.6.alpha1/local/lib/ -ltermcap -L"/home/users/drkirkby/s
age-4.6.alpha1/local/lib" -lpari  -lm
ld: 0711-434 SEVERE ERROR: Shared object /home/users/drkirkby/sage-4.6.alpha1/spkg/build/pari-2.4.3.svn-12577.p5/src/Oaix-ppc/libpari.so
        The shared object has no .loader section and is being ignored.
collect2: ld returned 12 exit status
make[3]: *** [gp-dyn] Error 1
make[3]: Target `gp' not remade because of errors.
make[3]: Leaving directory `/home/users/drkirkby/sage-4.6.alpha1/spkg/build/pari-2.4.3.svn-12577.p5/src/Oaix-ppc'
make[2]: *** [gp] Error 2
make[2]: Leaving directory `/home/users/drkirkby/sage-4.6.alpha1/spkg/build/pari-2.4.3.svn-12577.p5/src'
Error building GP

Change History (21)

comment:1 follow-up: Changed 11 years ago by leif

The extension .so doesn't seem to be the problem, since apparently the loader recognizes it as a shared library.

The extension .a for shared libraries is of course a bit odd since PARI also builds a static version which typically has the same name ending with .a...

comment:2 in reply to: ↑ 1 ; follow-up: Changed 11 years ago by drkirkby

Replying to leif:

The extension .so doesn't seem to be the problem, since apparently the loader recognizes it as a shared library.

The extension .a for shared libraries is of course a bit odd since PARI also builds a static version which typically has the same name ending with .a...

I wonder what the logic is for having both shared and static? I'd rather use the right extension on the right platform. I can discuss this with the Pari developers after getting clarification from some AIX experts on comp.unix.aix - they are a very helpful bunch.

comment:3 in reply to: ↑ 2 Changed 11 years ago by leif

Replying to drkirkby:

I wonder what the logic is for having both shared and static?

For an executable that doesn't make that much sense, but gp-sta[tic] is tested against gp-dyn[amic], which isn't bad.

And since PARI is (also) a library, it's pretty normal to build both. (Every proper library does this, at least if you --enable-shared and --enable-static, depending on what the defaults are.)

comment:4 Changed 11 years ago by drkirkby

I've reported this upstream:

Bug#1102: Acknowledgement (Build failure on AIX 5.3 - shared object has no .loader section)

The bug reported included a log against the latest snapshot, which shows the same problem.

Dave

comment:5 Changed 11 years ago by drkirkby

  • Report Upstream changed from N/A to Reported upstream. Little or no feedback.

comment:6 Changed 11 years ago by jdemeyer

  • Description modified (diff)

comment:7 follow-ups: Changed 11 years ago by drkirkby

I got this from Bill Allombert, a Pari developer:

Could you try to deactivate shared libraries by using
./Configure --static

That solves the problem - Pari then installs ok. I will create a patch.

Dave

comment:8 in reply to: ↑ 7 ; follow-up: Changed 11 years ago by jdemeyer

Replying to drkirkby:

I got this from Bill Allombert, a Pari developer:

Could you try to deactivate shared libraries by using
./Configure --static

That solves the problem - Pari then installs ok.

Did you only try to compile PARI/GP stand-alone, or also within Sage? Because I don't know whether it is possible to compile Sage statically.

comment:9 in reply to: ↑ 7 ; follow-up: Changed 11 years ago by jdemeyer

Replying to drkirkby:

I will create a patch.

If you do create a new pari spkg, please base it on the one at #9959: http://sage.math.washington.edu/home/jdemeyer/spkg/pari-2.4.3.svn-12577.p9.spkg

comment:10 in reply to: ↑ 8 Changed 11 years ago by drkirkby

Replying to jdemeyer:

Replying to drkirkby:

I got this from Bill Allombert, a Pari developer:

Could you try to deactivate shared libraries by using
./Configure --static

That solves the problem - Pari then installs ok.

Did you only try to compile PARI/GP stand-alone, or also within Sage? Because I don't know whether it is possible to compile Sage statically.

Only outside of Sage at this point. Some of the ATLAS libraries are only stati, but Sage links to them ok. Since Sage will not build fully on AIX, it's hard to know for sure what problems might present themselves at a later date, but I doubt a static Pari library would be one of them.

I later found out that it appears that on AIX the .a files are archives which can contain both static and shared objects. But using .so as an extension for shared objects is not a problem in itself.

comment:11 Changed 11 years ago by drkirkby

  • Description modified (diff)
  • Summary changed from Pari fails to build on AIX - using wrong extension for libraries. to Pari fails to build on AIX

comment:12 in reply to: ↑ 9 Changed 11 years ago by drkirkby

Replying to jdemeyer:

Replying to drkirkby:

I will create a patch.

If you do create a new pari spkg, please base it on the one at #9959: http://sage.math.washington.edu/home/jdemeyer/spkg/pari-2.4.3.svn-12577.p9.spkg

No problem. This should be a very low-risk patch, as it will be specific to AIX. But I have some other more important things to do now, so it will have to wait.

Dave

comment:13 Changed 10 years ago by roed

  • Report Upstream changed from Reported upstream. Little or no feedback. to Reported upstream. No feedback yet.

comment:14 Changed 10 years ago by jdemeyer

  • Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

"No feedback yet." is totally not correct here. Most applicable would be "Developers sort-of acknowledge the bug but don't really care enough to fix it"

comment:15 Changed 10 years ago by fbissey

I believe "-Wl,-r" is incorrect, "-Wl,-brtl" may have to be added for the linking to happen, as in the linking of binary.

comment:16 Changed 10 years ago by fbissey

And with a little bit of fiddling in Oaix-ppc/Makefile

frb15@p1n14-c /hpc/scratch/frb15/work/pari-2.5.1 :nano -w Oaix-ppc/Makefile 
frb15@p1n14-c /hpc/scratch/frb15/work/pari-2.5.1 :gmake gp
Making gp in Oaix-ppc
gmake[1]: Entering directory `/hpc/scratch/frb15/work/pari-2.5.1/Oaix-ppc'
rm -f libpari-gmp.so.2.5.1
gcc  -o "/hpc/scratch/frb15/work/pari-2.5.1/Oaix-ppc"/libpari-gmp.so.2.5.1 -shared  -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer    -fPIC -Wl,-brtl mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o Hensel.o QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o arith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bibli1.o bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellanal.o elliptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o lll.o nffactor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random.o rootpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat.o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnum.o members.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl.o elldata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o mpqs.o part.o stark.o subfield.o thue.o  -L/usr/local/lib -lgmp -lm 
if test "libpari-gmp.so.2.5.1" != "libpari.so"; then      rm -f libpari.so;       ln -s libpari-gmp.so.2.5.1 libpari.so; fi
if test "libpari-gmp.so.2.5.1" != "libpari-gmp.so.3"; then        rm -f libpari-gmp.so.3;         ln -s libpari-gmp.so.2.5.1 libpari-gmp.so.3; fi
rm -f gp-dyn
gcc  -o gp-dyn -L"/hpc/scratch/frb15/work/pari-2.5.1/Oaix-ppc" -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer    -Wl,-brtl  gp.o gp_init.o gp_rl.o highlvl.o whatnow.o plotX.o plotport.o -Wl,-blibpath:"/hpc/scratch/frb15/work/pari-2.5.1"/Oaix-ppc:"/usr/local/lib":/usr/lib:/usr/local/lib:/usr/local/pkg/readline/6.2_p1/lib32 -L/usr/local/pkg/readline/6.2_p1/lib32 -lreadline -L/usr/lib/ -lncurses -lpari -L/usr/lib -lX11   -lm 
ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
rm -f ../gp
ln -s Oaix-ppc/gp-dyn ../gp
gmake[1]: Leaving directory `/hpc/scratch/frb15/work/pari-2.5.1/Oaix-ppc'

The warning is about the fact that bcopy is in both libreadline and libc. Probably because I have both libreadline.a and .so at the moment and .a would have chosen over .so. That's minor compared to some other stuff like the fact that it segfault:

/hpc/scratch/frb15/work/pari-2.5.1 :./gp
  ***   bug in PARI/GP (Segmentation Fault), please report
### Errors on startup, exiting...

For info that's on a power7 machine running aix-6.1(TL6) with gcc-4.6.3 [compiled on another LPAR on the same machine running TL7].

comment:17 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:18 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:19 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:20 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:21 Changed 3 years ago by jdemeyer

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Resolution set to wontfix
  • Status changed from new to closed

Closing as obsolete.

Note: See TracTickets for help on using tickets.