gmp/ pari-gp compilation problem

Bill Allombert Bill.Allombert at math.u-bordeaux1.fr
Fri May 4 17:17:16 CEST 2007


On Thu, May 03, 2007 at 02:29:21PM +0100, Robin Hankin wrote:
> Hi
> 
> MacOSX 10.4.9, gcc 4.0.1.
> usr/bin/gcc  -o gp-sta -O3 -Wall -fno-strict-aliasing -fomit-frame- 
> pointer     mp.o mpinl.o Flx.o Qfb.o RgX.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 perm.o polarit1.o polarit2.o polarit3.o rootpol.o  
> subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat.o  
> default.o errmsg.o es.o init.o intnum.o members.o sumiter.o aprcl.o  
> elldata.o elliptic.o galois.o groupid.o kummer.o mpqs.o nffactor.o  
> part.o stark.o subfield.o thue.o darwin.o gp.o gp_init.o gp_rl.o  
> highlvl.o whatnow.o plotX.o plotport.o  -L/usr/local/lib -lreadline - 
> L/usr/lib -lncurses -L/usr/X11R6/lib -lX11  -L/usr/local/lib -lgmp
> /usr/bin/ld: truncated or malformed archive: /usr/local/lib/libgmp.a  
> (ranlib structures in table of contents extends past the end of the  
> table of contents, can't load from it)
> /usr/bin/ld: warning multiple definitions of symbol _PC
> /usr/local/lib/libreadline.dylib(terminal.so) definition of _PC
> /usr/lib/libncurses.dylib(lib_tputs.o) definition of _PC
> /usr/bin/ld: warning multiple definitions of symbol _UP
> /usr/local/lib/libreadline.dylib(terminal.so) definition of _UP
> /usr/lib/libncurses.dylib(lib_termcap.o) definition of _UP
> /usr/bin/ld: warning multiple definitions of symbol _BC
> /usr/local/lib/libreadline.dylib(terminal.so) definition of _BC
> /usr/lib/libncurses.dylib(lib_termcap.o) definition of _BC
> collect2: ld returned 1 exit status
> make[2]: *** [gp-sta] Error 1
> make[1]: *** [gp] Error 2
> make: *** [all] Error 2

Furthermore, the much simpler program

#include <stdio.h>
#include <gmp.h>
void f(void) { mpn_gcdext(NULL,NULL, NULL, NULL, 0, NULL, 0); }
main(){ printf("%s", gmp_version); }

fails to link in the same way:
octopus:~/scratch/pari-2.3.2/config% gcc gmp_version.c -o test -L/usr/
local/lib -lgmp
/usr/bin/ld: truncated or malformed archive: /usr/local/lib/libgmp.a
(ranlib structures in table of contents extends past the end of the
table of contents, can't load from it)
collect2: ld returned 1 exit status
octopus:~/scratch/pari-2.3.2/config%

Cheers,
Bill.


More information about the gmp-discuss mailing list