Compiling GMP on OS X 10.6 (snow leopard)

Jack Howarth howarth at bromo.med.uc.edu
Sat Oct 10 19:50:01 CEST 2009


On Sat, Oct 10, 2009 at 06:29:47PM +0200, Torbjorn Granlund wrote:
> 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
> _______________________________________________
> gmp-bugs mailing list
> gmp-bugs at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-bugs

Torbjörn,
   I submitted a change to upstream config.guess which ensures that the
detected architecture is obtained from the code generation of the
compiler on intel darwin. You might want to use a change like that (since
you don't seem to use the GNU config.guess)...

http://git.savannah.gnu.org/gitweb/?p=config.git;a=commitdiff;h=ccf975556a0f6797fe80395cd6f314682a770f15

FYI,
          Jack



More information about the gmp-bugs mailing list