Compiling GMP on OS X 10.6 (snow leopard)

Torbjorn Granlund tg at gmplib.org
Sat Oct 10 18:29:47 CEST 2009


Hans Aberg <haberg at math.su.se> writes:

  On 8 Oct 2009, at 07:39, Katie Scott wrote:
  
  > GMP does not seem to successfully compile on Mac OS X 10.6.  It
  > compiles but make check fails.
  ...
  > libtool: link: cannot find the library `libraries/gmp-4.3.1/libgmp.la'
  > or unhandled argument `libraries/gmp-4.3.1/libgmp.la'
  > make[4]: *** [t-bswap] Error 1
  > make[3]: *** [check-am] Error 2
  > make[2]: *** [check-recursive] Error 1
  > make[1]: *** [check-recursive] Error 1
  > make: *** [check] Error 2
  >
  >
  > I see libgmp.la in the directory.
  
  Note that 10.6 is a true 64-bit OS - 10.5 is 32-bit; for a 32-bit
  compile, one should use 'gcc -arch i386'. Though I do not know if that
  has anything to do with the problem.
  
There is some misunderstanding here.

Mac OS X has long been a 64-bit OS in the sense that it has supported
64-bit logical addressing (and surely very wide physical addressing too,
though no hardware thus no software supports 64-bit physical
addressing).

Previously "gcc -m64 files..." has been used to create 64-bit binaries.
Without -m64 the compiler defaulted to generating 32-bit code.

Perhaps what you are saying that the new compiler under 10.6 defaults to
generating 64-bit code, and that one needs to pass an option to make it
generate 32-bit code?

-- 
Torbjörn


More information about the gmp-bugs mailing list