gmp/ pari-gp compilation problem

Robin Hankin r.hankin at noc.soton.ac.uk
Thu May 3 15:29:21 CEST 2007


Hi

MacOSX 10.4.9, gcc 4.0.1.

I've been trying to install the gmp library for use with PARI/GP.

I can install PARI without gmp support no problem, but I can't install
it with the gmp options set.  After some considerable discussion with
the PARI/GP folk we decided to

After

1) erase the directory where you compiled gmp
2) unpack gmp
3) configure it
4) make install 2>&1 | tee install-log
5) make check


all of which work,  making pari-gp gives me errors along the lines of

[snip]
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



The install-log file contains the following lines:



gcc `test -f 'gen-fac_ui.c' || echo './'`gen-fac_ui.c -o gen-fac_ui
./gen-fac_ui 64 0 >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)
gcc `test -f 'gen-fib.c' || echo './'`gen-fib.c -o gen-fib
./gen-fib header 64 0 >fib_table.h || (rm -f fib_table.h; exit 1)
./gen-fib table 64 0 >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1)
gcc `test -f 'gen-bases.c' || echo './'`gen-bases.c -o gen-bases -lm
./gen-bases header 64 0 >mp_bases.h || (rm -f mp_bases.h; exit 1)
./gen-bases table 64 0 >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1)
gcc `test -f 'gen-psqr.c' || echo './'`gen-psqr.c -o gen-psqr -lm
./gen-psqr 64 0 >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1)
make  install-recursive
Making install in tests
Making install in .
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
-

[. . . snip . . .]

om.o mpn/random2.o mpn/pow_1.o mpn/rootrem.o mpn/sqrtrem.o mpn/ 
get_str.o mpn/set_str.o mpn/scan0.o mpn/scan1.o mpn/popcount.o mpn/ 
hamdist.o mpn/cmp.o mpn/perfsqr.o mpn/bdivmod.o mpn/gcd_1.o mpn/gcd.o  
mpn/gcdext.o mpn/tdiv_qr.o mpn/dc_divrem_n.o mpn/sb_divrem_mn.o mpn/ 
jacbase.o mpn/get_d.o mpn/mullow_n.o mpn/mullow_basecase.o mpn/umul.o  
mpn/copyi.o mpn/copyd.o mpn/sqr_diagonal.o mpn/addsub_n.o printf/ 
asprintf.o printf/asprntffuns.o printf/doprnt.o printf/doprntf.o  
printf/doprnti.o printf/fprintf.o printf/obprintf.o printf/ 
obvprintf.o printf/obprntffuns.o printf/printf.o printf/printffuns.o  
printf/snprintf.o printf/snprntffuns.o printf/sprintf.o printf/ 
sprintffuns.o printf/vasprintf.o printf/vfprintf.o printf/vprintf.o  
printf/vsnprintf.o printf/vsprintf.o printf/repl-vsnprintf.o scanf/ 
doscan.o scanf/fscanf.o scanf/fscanffuns.o scanf/scanf.o scanf/ 
sscanf.o scanf/sscanffuns.o scanf/vfscanf.o scanf/vscanf.o scanf/ 
vsscanf.o
ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
ranlib .libs/libgmp.a
ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
creating libgmp.la
(cd .libs && rm -f libgmp.la && ln -s ../libgmp.la libgmp.la)
test -z "/usr/local/lib" || /Users/rksh/scratch/gmp-4.2.1/install-sh - 
d "/usr/local/lib"
/bin/sh ./libtool --mode=install /usr/bin/install -c  'libgmp.la' '/ 
usr/local/lib/libgmp.la'
/usr/bin/install -c .libs/libgmp.lai /usr/local/lib/libgmp.la
/usr/bin/install -c .libs/libgmp.a /usr/local/lib/libgmp.a
ranlib /usr/local/lib/libgmp.a
ranlib: file: /usr/local/lib/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(obprintf.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(obvprintf.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(repl-vsnprintf.o) has no symbols
chmod 644 /usr/local/lib/libgmp.a
----------------------------------------------------------------------
Libraries have been installed in:
    /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
    - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
      during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include" || /Users/rksh/scratch/gmp-4.2.1/install- 
sh -d "/usr/local/include"
/usr/bin/install -c -m 644 'gmp.h' '/usr/local/include/gmp.h'
test -z "/usr/local/include" || /Users/rksh/scratch/gmp-4.2.1/install- 
sh -d "/usr/local/include"
make  install-data-hook

+-------------------------------------------------------------+
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so.                                        |
|                                                             |
| GMP has been carefully tested by its authors, but compilers |
| are all too often released with serious bugs.  GMP tends to |
| explore interesting corners in compilers and has hit bugs   |
| on quite a few occasions.                                   |
|                                                             |
+-------------------------------------------------------------+



anyone got any ideas?


--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743



More information about the gmp-discuss mailing list