[R] ld Problem with file libRlapack.so

rgrubbfink@cox.net rgrubbfink at cox.net
Thu May 1 21:46:27 CEST 2003


While compiling R 1.7.0 on AIX4.3.3, I ran into a problem with the libRlapack.so file. The following command, as put out by the file src/modules/lapack/Makefile, would not work (I reformatted the command to make it fit in 72 columns):

/acct/rlg0301/bin/gcc -Wl,-bM:SRE -Wl,-H512 -Wl,-T512 \ -Wl,-bnoentry -Wl,-bexpall -Wl,-bI:../../../etc/R.exp \ -L/usr/local/lib -o lapack.so \ -Wl,-bI:../../../etc/Rlapack.exp Lapack.lo rgeev.lo \
rsyev.lo -L../../../bin -lRlapack -L/usr/local/lib \
-L/acct/rlg0301/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.3 \
-L/acct/rlg0301/lib -lg2c -lm \
/acct/rlg0301/lib/gcc-lib/rs6000-ibm-aix4.3.3.0/2.95.3/libgcc.a \
-lg -lreadline -ldl -ltermcap -lm -lc

gcc (2.95) uses the AIX ld command, and the loader complained that it could "...not find or open library file -l Rlapack". But libRlapack.so existed in the proper directory. After much reading of the ld man page, the only thing I could figure out was that perhaps ld was not being run in the dynamic mode. I hacked a solution by creating a symbolic link, libRlapack.a in the same directory as, and pointing to libRlapack.so. I was able to finish the compilation and installation of R, but I have not yet done any tests to see if the lapack routines work properly.

Does anybody know why the loader was not able to find the Rlapack library? Is there a better solution than the one I used (besides using something other than AIX :-)?

Thanks



More information about the R-help mailing list