MacOS X linking problem
Claude Dion
claude.dion at tp.umu.se
Fri Nov 10 14:45:46 CET 2006
Hi!
I have a problem linking with the gmp libraries, even though make
check returns no error. I get
% gcc -o arbitrary arbitrary.c -lgmp -lm
/usr/bin/ld: /usr/local/lib/libgmp.dylib bad magic number (not a Mach-
O file)
collect2: ld returned 1 exit status
or, with --disable-shared:
% gcc -o arbitrary arbitrary.c -lgmp -lm
/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
I don't know if it is related, but during make install I get:
% make install
[...]
/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
[...]
gmp version 4.2.1
gcc version 4.0.1 (Apple Computer, Inc. build 5247)
Mac OS X 10.4.8, PowerPC G5 Quad
% uname -a
Darwin pingvin.tp.umu.se 8.8.0 Darwin Kernel Version 8.8.0: Fri Sep
8 17:18:57 PDT 2006; root:xnu-792.12.6.obj~1/RELEASE_PPC Power
Macintosh powerpc
% ./config.guess
powerpc970-apple-darwin8.8.0
% ./configfsf.guess
powerpc-apple-darwin8.8.0
Thanks
Claude
--
Claude Dion claude.dion at tp.umu.se
Department of Physics
Umea University tel: +46 90 786 5043
SE-901 87 Umea fax: +46 90 786 6673
Sweden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gmplib.org/list-archives/gmp-bugs/attachments/20061110/1ff1a784/attachment.html
More information about the gmp-bugs
mailing list