[R-SIG-Mac] odd problem building gmp from source

Simon Urbanek simon.urbanek at r-project.org
Wed Jan 12 03:01:23 CET 2011


On Jan 11, 2011, at 6:06 PM, Carl Witthoft wrote:

> Hi,
> I chose to make a minor edit to the R-source  matrixz.R in the gmp package (not to be confused with the GNU gmp library which it calls).
> 
> On my Intel iMac at work, running OSX 10.6.4,  it compiled just fine.
> 
> for reference, that Mac has:
> %gcc -version
> i686-apple-darwin10-gcc-4.2.1: no input files
> 
> and I honestly forget which version of gmplib I installed.
> 
> So, I took the R-gmp source home, where I have an Intel iMac w/ 10.5.8, and I get the following foulup:
> 
> TheiMac:~/downloads/gmpmod:cgw-507$ ./configure
> creating cache ./config.cache
> checking for __gmpz_ui_sub in -lgmp... no
> configure: error: GNU MP not found, or not 4.1.4 or up, see http://swox.com.gmp
> 
> I've tried installing both GNU gmp 4.3.2 and 5.0.1, same problem.  And the libraries are in /usr/local/lib, just as they are on my work iMac.
> 

If you have doubt about your builds of gmp you can always pick the one used on CRAN if you wish at
http://r.research.att.com/libs/


> I thought it might be the compiler, so I checked:
> 
> TheiMac:~/downloads/gmpmod:cgw-508$ gcc -version
> i686-apple-darwin9-gcc-4.2.1: no input files
> 

You really meant to use --version I presume:

ginaz:~$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)

but the version usually doesn't matter - especially not on on 10.6 ;)


> Any ideas what I've got set up wrong? Let me know what other system or app diagnostics I can supply.
> 

Well, the only useful diagnostics is the config.log - it will tell you exactly what the error is ...

Cheers,
Simon



> thanks
> Carl
> 
> (I did finagle an ugly workaround, by bringing home a copy of the installed R-gmp package.  I had to go to the Library/Frameworks/... /libs/i386 directory and swap in the original gmp.so  file (from the CRAN package) to get things mostly working))
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 



More information about the R-SIG-Mac mailing list