keith.briggs on Mon, 29 Aug 2005 17:11:28 +0200


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

AMD64 compile problem


I cannot get pari/gp to compile on my AMD64 linux system (Fedora core 4 x86_64, gcc-4.0.1).
There seems to be two major problems:

1. non-compatible types in gp_rl.c

2. linkage problem with kernel.c

Adding "-fPIC" to the gcc options seems to fix problem 2, but the resulting gp program crashes at startup.
no doubt due to problem 1.
Any hints?

Keith

../src/gp/gp_rl.c: In function ?change_state?:
../src/gp/gp_rl.c:106: warning: format ?%s? expects type ?char *?, but argument 2 has type ?long int?
../src/gp/gp_rl.c:106: warning: format ?%s? expects type ?char *?, but argument 3 has type ?long int?
../src/gp/gp_rl.c: In function ?get_matches?:
../src/gp/gp_rl.c:307: warning: function called through a non-compatible type
../src/gp/gp_rl.c:307: note: if this code is reached, the program will abort
../src/gp/gp_rl.c: In function ?rl_short_help?:
../src/gp/gp_rl.c:586: warning: zero-length printf format string
../src/gp/gp_rl.c: In function ?init_readline?:
../src/gp/gp_rl.c:633: warning: function called through a non-compatible type
../src/gp/gp_rl.c:633: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:634: warning: function called through a non-compatible type
../src/gp/gp_rl.c:634: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:635: warning: function called through a non-compatible type
../src/gp/gp_rl.c:635: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:636: warning: function called through a non-compatible type
../src/gp/gp_rl.c:636: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:637: warning: function called through a non-compatible type
../src/gp/gp_rl.c:637: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:638: warning: function called through a non-compatible type
../src/gp/gp_rl.c:638: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:640: warning: function called through a non-compatible type
../src/gp/gp_rl.c:640: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:641: warning: function called through a non-compatible type
../src/gp/gp_rl.c:641: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:642: warning: function called through a non-compatible type
../src/gp/gp_rl.c:642: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:643: warning: function called through a non-compatible type
../src/gp/gp_rl.c:643: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:644: warning: function called through a non-compatible type
../src/gp/gp_rl.c:644: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:645: warning: function called through a non-compatible type
../src/gp/gp_rl.c:645: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:646: warning: function called through a non-compatible type
../src/gp/gp_rl.c:646: note: if this code is reached, the program will abort
../src/gp/gp_rl.c:647: warning: function called through a non-compatible type
../src/gp/gp_rl.c:647: note: if this code is reached, the program will abort

/usr/bin/ld -o libpari.so.2.1.6 -shared -soname libpari.so.1 -lc -lm kernel.o mp.o alglin1.o alglin2.o arith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bibli1.o bibli2.o buch1.o buch2.o buch3.o buch4.o galconj.o gen1.o gen2.o gen3.o ifactor1.o polarit1.o polarit2.o polarit3.o rootpol.o subgroup.o trans1.o trans2.o trans3.o elliptic.o galois.o kummer.o mpqs.o nffactor.o stark.o subfield.o thue.o anal.o compat.o errmsg.o es.o helpmsg.o init.o sumiter.o mpinl.o
/usr/bin/ld: kernel.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
kernel.o: could not read symbols: Bad value
make[1]: *** [libpari.so.2.1.6] Error 1
make[1]: Leaving directory `/home/install/pari-2.1.6/Olinux-x86_64'
make: *** [gp] Error 2