Incorrect build under Mac OS X G5 (configure bug?)

Vincent Lefevre vincent at
Fri Dec 1 03:31:49 CET 2006


When GMP 4.2.1 is built and installed without any particular configure
option (except --prefix) on my Mac OS X machine (PowerPC G5), I now get
the following error when building MPFR:

/bin/sh ./libtool --tag=CC --mode=link gcc  -m64  -Wl,-search_paths_first  -L/Users/vinc17/gmp64/lib -o -rpath /usr/local/lib -version-info 1:1:0 exceptions.lo [...] lngamma.lo  -lgmp
rm -fr  .libs/libmpfr.1.0.1.dylib
gcc -dynamiclib ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/libmpfr.1.0.1.dylib  .libs/exceptions.o [...] .libs/lngamma.o  -L/Users/vinc17/gmp64/lib /Users/vinc17/gmp64/lib/libgmp.a  -m64 -Wl,-search_paths_first -install_name  /usr/local/lib/libmpfr.1.dylib -Wl,-compatibility_version -Wl,2 -Wl,-current_version -Wl,2.1
ld64 failed: absolute addressing (perhaps -mdynamic-no-pic) used in ___gmpn_popcount from /Users/vinc17/gmp64/lib/libgmp.a(popcount.o) not allowed in slidable image
/usr/bin/libtool: internal link edit command failed
make[1]: *** [] Error 1
make: *** [all-recursive] Error 1

It was working in the past. But it seems that the latest security
update of Mac OS X made this bug appeared (I wonder why).

Using the --with-pic configure option fixes the problem.

Now, the other problem is that the shared library isn't built, probably
because the configure script said:

checking whether the gcc linker (/usr/bin/ld) supports shared libraries... no

It seems that autoconf 2.59 (which was used to build the configure
script provided in the GMP 4.2.1 archive) is either buggy or too old.
I have no such problem after regenerating the configure script with
autoreconf (autoconf 2.60 is installed on my machine).

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

More information about the gmp-bugs mailing list