[R-SIG-Mac] libVec and Lion

Simon Urbanek simon.urbanek at r-project.org
Tue Jul 26 23:47:12 CEST 2011


On Jul 26, 2011, at 4:15 AM, Andreas Noack Jensen wrote:

> I believe I have a veclib problem. I have just upgraded to Lion from 
> Snow Leopard on my MacBook Pro 15'', medio 2009 and done a fresh install of 
> R 2.13.1 and the latest gfortran 4.2.3 from att.research. Unfortunately I am 
> not able to make a reproducible example of the problem without my own package 
> which is not on CRAN (yet). The problem is only present when I use vecLib and 
> not when using the reference BLAS (I also checked on Linux and Win and it 
> worked fine). I had no problems under Snow Leopard. Here are the details: I 
> install by R CMD INSTALL without errors but when I try to load the package by 
> library(civecm) I get
> 
> Error in dyn.load(file, DLLpath = DLLpath, ...) : 
>  unable to load shared object 
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/civecm/libs/
> 	x86_64/civecm.so':
> 
> dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/civecm/
> libs/x86_64/civecm.so, 6): Library not loaded: libRblas.dylib
>  Referenced from: 
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/civecm/libs/
> x86_64/civecm.so
>  Reason: image not found
> Error: package/namespace load failed for 'civecm'
> 
> The civecm.so exists and is created from Fortran code using both BLAS and 
> Lapack subroutines. Any help is appreciated and I hope I have included the 
> relevant information.
> 

It seems the BLAS path is incomplete. Please run otool -L on your .so -- if compiled correctly you should see something like

ginaz:library$ otool -L KernSmooth/libs/x86_64/KernSmooth.so
KernSmooth/libs/x86_64/KernSmooth.so:
	KernSmooth.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/2.13/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/2.13/Resources/lib/libgfortran.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/Library/Frameworks/R.framework/Versions/2.13/Resources/lib/libR.dylib (compatibility version 2.13.0, current version 2.13.1)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.19.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5)

If in doubt, compile your package with reference BLAS and then switch to vecLib BLAS - I suspect that will work.

Cheers,
Simon







> Best regards
> 
> --
> Andreas Noack Jensen
> Ph.d.-stipendiat
> 
> Økonomisk Institut                      andreas.noack.jensen at econ.ku.dk
> Københavns Universitet                  http://www.econ.ku.dk/phdstudent/noack/
> Øster Farimagsgade 5, bygning 26        Tlf.: 353 23094
> 1353 København K
> 
> _______________________________________________
> 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