R and Blas library linkage

When trying to debug something in R, it came to my attention that libRblas might not be linked to R the way it’s supposed to be. I’m not sure what it is supposed to be though. I do have the openblas bundle installed.

   $ ldd /usr/lib64/R/bin/exec/R
        linux-vdso.so.1 (0x00007ffeec3b9000)
        libR.so => not found
        libRblas.so => not found
        libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007feb27ef2000)
        libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007feb27ecf000)
        libc.so.6 => /usr/lib64/libc.so.6 (0x00007feb27cdb000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007feb27f7b000)

but I do have it:

~ $ locate  libRblas.so

In what regard? ldd only shows the system paths which it’s not in. R does add the necessary path mainly via /usr/bin/R and /usr/lib64/R/etc/ldpaths so they are found when opened. libRblas.so is basically a wrapper (only 18232 bytes) around openblas (as that’s what is used in CL).

If R wasn’t able to find those files, it wouldn’t load. Renaming the files to libR.so.asdf leads to:

$ R
/usr/lib64/R/bin/exec/R: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory

Ok thanks, but it seems to have something to do with the R internals (although still possibly a version difference in some library). I traced the difference to this call in R’s eigen() function:

z <- if (!complex.x) 
  .Internal(La_rs(x, only.values))
else .Internal(La_rs_cmplx(x, only.values))