[R-SIG-Mac] Installing package from source

Simon Urbanek simon.urbanek at r-project.org
Sun May 8 00:28:15 CEST 2011


There is a lot of missing pieces, but I bet that your package links unversioned libatlas-MacPro.dylib instead of libRblas.dylib and you don't have the appropriate symlinks in x86_64. (Just for the record: this is "your mileage may vary" setup and is NOT what you get when you install R). There are several solutions:

a) switch back to R BLAS when building your package (this is the default in "normal" R)

b) make a symlink from to all sub-arch directories (i386, x86_64 possibly ppc) to libatlas-MacPro.dylib. This is a just a hack - your binaries won't work on anyone else's machines.

c) add versioned path to your libatlas-MacPro.dylib using install_name_tool -id, preferably pointing to libRblas and NOT the MacPro variant, i.e. for R 2.13.x:
install_name_tool -id /Library/Frameworks/R.framework/Versions/2.13/Resources/lib/libRblas.dylib libatlas-MacPro.dylib

Cheers,
Simon



On May 7, 2011, at 6:07 PM, Göran Broström wrote:

> I'm new to the Mac, but have used  R  under Linux for about 15 years. Now
> 
> R CMD INSTALL skel_1.0-2.tar.gz
> 
> fails with error message
> ------------------------------------
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>  unable to load shared object
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel/libs/x86_64/skel.so':
>  dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel/libs/x86_64/skel.so,
> 6): Library not loaded: libatlas-MacPro.dylib
>  Referenced from:
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel/libs/x86_64/skel.so
>  Reason: image not found
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel'
> * restoring previous
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel'
> ----------------------------------
> 
> The 'libatlas-MacPro.dylib' seems to be the culprit, but who knows? I
> installed it just before this, following Simon's recipe from a post to this
> list in October 2010.
> skel is a private package which installs under Linux and Windose without
> problems.
> 
>> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
> 
> locale:
> [1] C/C/C/C/en_US.UTF-8/C
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> I have also installed gfortran, Xcode, etc.
> 
> Göran
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> 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