Closed kenahoo closed 6 years ago
I get a similar error when trying to load the Matrix
library:
> library(Matrix)
com.oracle.truffle.r.runtime.ffi.DLL$DLLException: unable to load shared object '/Users/kwilliams/Downloads/graalvm-ce-1.0.0-rc8/Contents/Home/jre/languages/R/library/Matrix/libs/Matrix.so'
dlopen(/Users/kwilliams/Downloads/graalvm-ce-1.0.0-rc8/Contents/Home/jre/languages/R/library/Matrix/libs/Matrix.so, 6): Library not loaded: @rpath/libgfortran.3.dylib
Referenced from: /Users/kwilliams/Downloads/graalvm-ce-1.0.0-rc8/Contents/Home/jre/languages/R/library/Matrix/libs/Matrix.so
Reason: image not found
FWIW, I do have libgfortran.3.dylib
in my installation:
% ls /Users/kwilliams/Downloads/graalvm-ce-1.0.0-rc8/Contents/Home/jre/languages/R/lib
libR.dylib* libgcc_s.1.dylib libgfortran.dylib@ libquadmath.0.dylib libz.dylib@
libRblas.dylib* libgcc_s.dylib@ libpcre.1.dylib libquadmath.dylib@
libRlapack.dylib* libgfortran.3.dylib libpcre.dylib@ libz.1.dylib
I did a couple of things:
There were two gfortran
executables in my path, in /Users/kwilliams/miniconda3/bin
and /usr/local/bin
. I removed /Users/kwilliams/miniconda3/bin
from my $PATH
variable.
I ran the jre/languages/R/bin/configure_fastr
script, which rewrote my jre/languages/R/etc/Makeconf
file. It was necessary to eliminate miniconda
from my $PATH
before configure_fastr
would run successfully.
I ran Graal's R, then did install.packages("Matrix")
, which succeeded. I don't know whether both 1. and 2. were necessary to get it to work.
Now I can do library(Matrix)
successfully. I also installed nlme
and mgcv
successfully, hopefully paving the way to installing other packages that depend on them.
Hi Ken,
thank you for reporting this. @zslajchrt fixed that in the last commit 3ae14b8bafe26c38fc361efab2d87789f1f9d83d. However, this change will only be available in the next public release.
Thanks!
For various R packages that I try to install, I'm getting errors when it tries to load Fortran libraries:
I wondered whether I could solve it by re-installing
nlme
, but that hits a different Fortran error:Is this an expected problem, or is there something wrong with my setup? I'm using:
(That seems like kind of an old year/month combination, but that's what I got with
bin/gu install R
.)