Hi everyone -

I'm having the same package installation issues with igraph, despite  
installing Xcode. I don't really know what to do. I'll paste the bug I  
get below - is there an easy fix for my problem? It seems to be an  
issue with the fact that R can't find a C compiler I'm guessing since  
I know that this package uses C code. I installed Xcode, but I'm not  
terribly informed about how to fix these issues. Any guidance?

-Michael


*****not from source
 > install.packages("igraph")
trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.10/igraph_0.5.3.tgz'
Content type 'application/x-gzip' length 3277777 bytes (3.1 Mb)
opened URL
==================================================
downloaded 3.1 Mb


The downloaded packages are in
	/var/folders/7J/7JpbFNySGACoH3teAShOLE+++TM/-Tmp-//RtmpFip5QZ/ 
downloaded_packages
 > library("igraph")
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library '/Library/Frameworks/R.framework/ 
Resources/library/igraph/libs/x86_64/igraph.so':
   dlopen(/Library/Frameworks/R.framework/Resources/library/igraph/ 
libs/x86_64/igraph.so, 10): Symbol not found: ___gmpz_clear
   Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
igraph/libs/x86_64/igraph.so
   Expected in: dynamic lookup

Error : .onLoad failed in 'loadNamespace' for 'igraph'
Error: package/namespace load failed for 'igraph'

*****from source
 > install.packages("igraph", type="source")
trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/igraph_0.5.3.tar.gz'
Content type 'application/x-gzip' length 1211771 bytes (1.2 Mb)
opened URL
==================================================
downloaded 1.2 Mb

* installing *source* package ‘igraph’ ...
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/private/var/folders/7J/7JpbFNySGACoH3teAShOLE++ 
+TM/-Tmp-/Rtmptn2nFy/R.INSTALL10d63af1/igraph':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
ERROR: configuration failed for package ‘igraph’
* removing ‘/Library/Frameworks/R.framework/Versions/2.10/Resources/ 
library/igraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.10/ 
Resources/library/igraph’

The downloaded packages are in
	‘/private/var/folders/7J/7JpbFNySGACoH3teAShOLE+++TM/-Tmp-/RtmpFip5QZ/ 
downloaded_packages’
Updating HTML index of packages in '.Library'
Warning message:
In install.packages("igraph", type = "source") :
   installation of package 'igraph' had non-zero exit status
On Nov 12, 2009, at 12:53 PM, Steve Lianoglou wrote:

> Heh ...
>
> On Nov 12, 2009, at 12:45 PM, Michael Barnett wrote:
>
>> I apologize for not being more precise. I'm pasting the printout I  
>> get below:
>>
>> *****
>> > install.packages("igraph")
>> trying URL 'http://lib.stat.cmu.edu/R/CRAN/bin/macosx/leopard/contrib/2.10/igraph_0.5.2-2.tgz'
>> Content type 'application/x-gzip' length 3312372 bytes (3.2 Mb)
>> opened URL
>> ==================================================
>> downloaded 3.2 Mb
>>
>>
>> The downloaded packages are in
>> 	/var/folders/7J/7JpbFNySGACoH3teAShOLE+++TM/-Tmp-//RtmpXG1NQC/ 
>> downloaded_packages
>> > library(igraph)
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>> unable to load shared library '/Library/Frameworks/R.framework/ 
>> Resources/library/igraph/libs/x86_64/igraph.so':
>> dlopen(/Library/Frameworks/R.framework/Resources/library/igraph/ 
>> libs/x86_64/igraph.so, 10): Symbol not found: ___gmpz_clear
>> Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
>> igraph/libs/x86_64/igraph.so
>> Expected in: dynamic lookup
>>
>> Error : .onLoad failed in 'loadNamespace' for 'igraph'
>> Error: package/namespace load failed for 'igraph'
>> ******
>
> ... that's really funny. I just tried to re-install igraph like you  
> did, and now I got the same error :-)
>
> Do you have XCode installed? Installing the package from source  
> seems to do the trick:
>
> install.packages('igraph', type='source')
> ... lots of compile info ...
>
> Now loading igraph works (I had to restart R ... I guess having  
> tried to load the original compiled package hose the workspace,  
> somehow).
>
> I typically install most packages from source, anyway, so I guess  
> this is why I didn't see this before.
>
> Does this work for you?
>
> -steve
>
> btw - I'm on a mac pro w/ snow leopard, not that I'm sure that  
> matters now ...
>
> --
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  |  Memorial Sloan-Kettering Cancer Center
>  |  Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
>


	[[alternative HTML version deleted]]

