My main production machine has a 64-bit AMD processor and runs Debian Lenny as the primary OS. As I have noticed substantial (often 5x) speed improvements, I always compile R myself against the ACML. For what I do, the difference is important.
I got the following error when trying to install some packages:
/usr/bin/ld: cannot find -lblas
collect2: ld returned 1 exit status
After Google didn't help, and I couldn't find anything explicit in the manuals about this error, I read through "A.3.1.5 Shared BLAS" in the Installation and Administration manual. After a little experimenting, I found that the solution is to make a symbolic link using
ln -s /opt/acml3.6.1/gfortran64_mp/lib/libacml_mp.so /usr/local/lib64/R/lib/libblas.so
AFAICS, the symbolic link needs to go in the same directory as libRlapack.so, if the directory structure happens to be different from my current directory structure. I assume that this will work with any version of ACML provided it has the .so extension.
What is different from anything in the manual is that the symbolic link needs to be a file named libblas.so, not libRblas.so. Note that the error said R could not find -lblas, which means it is looking for a file named libblas.so. Otherwise the error would have said -lRblas was not found.
Wednesday, September 05, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment