-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building Rcall
: R cannot be found
#326
Comments
Does libR.so exist somewhere in the folder? libR is needed by RCall and RCall will report the "R cannot be found" error if RCall cannot find the libR. |
julia> ENV["R_HOME"] = "/usr/lib64/R/lib"
"/usr/lib64/R/lib"
(v1.3) pkg> build RCall
Building Conda → `~/.julia/packages/Conda/kLXeC/deps/build.log`
Building RCall → `~/.julia/packages/RCall/iojZI/deps/build.log`
┌ Error: Error building `RCall`:
│ ERROR: LoadError: R cannot be found. Set the "R_HOME" environment variable to re-run Pkg.build("RCall").
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] top-level scope at /home/chriselrod/.julia/packages/RCall/iojZI/deps/build.jl:49
│ [3] include at ./boot.jl:328 [inlined]
│ [4] include_relative(::Module, ::String) at ./loading.jl:1094
│ [5] include(::Module, ::String) at ./Base.jl:31
│ [6] include(::String) at ./client.jl:432
│ [7] top-level scope at none:5
│ in expression starting at /home/chriselrod/.julia/packages/RCall/iojZI/deps/build.jl:10
└ @ Pkg.Operations ~/Documents/languages/julia/usr/share/julia/stdlib/v1.3/Pkg/src/backwards_compatible_isolation.jl:647
shell> ls /usr/lib64/R/lib
haswell/ libRblas.so* libRlapack.so* libR.so* Contents of > ls /usr/lib64/R
bin/ COPYING doc/ etc/ include/ lib/ library/ modules/ rstudio/ share/ SVN-REVISION
> ls /usr/lib64/R/lib
haswell/ libRblas.so* libRlapack.so* libR.so* The official Julia 1.1 binary also fails to build RCall: (v1.1) pkg> build RCall
Building Conda → `~/.julia/packages/Conda/kLXeC/deps/build.log`
Building RCall → `~/.julia/packages/RCall/iojZI/deps/build.log`
┌ Error: Error building `RCall`:
│ ERROR: LoadError: R cannot be found. Set the "R_HOME" environment variable to re-run Pkg.build("RCall").
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] top-level scope at /home/chriselrod/.julia/packages/RCall/iojZI/deps/build.jl:49
│ [3] include at ./boot.jl:326 [inlined]
│ [4] include_relative(::Module, ::String) at ./loading.jl:1038
│ [5] include(::Module, ::String) at ./sysimg.jl:29
│ [6] include(::String) at ./client.jl:403
│ [7] top-level scope at none:0
│ in expression starting at /home/chriselrod/.julia/packages/RCall/iojZI/deps/build.jl:10
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
julia> ENV["R_HOME"]
"/usr/lib64/R" The > Rscript -e "R.version"
_
platform x86_64-generic-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05)
nickname Action of the Toes |
I'm having similar problems to this, with Julia 1.1.1/r-devel: see here |
ugh. managed to build RCall:
seems to work. But then when I run julia and type
fails (i.e. produces an empty Produces I don't mean to hijack this issue, I'm happy to open a new one if this seems to be getting off-track. |
bump ... any suggestions for further experimentation/diagnosis? |
What is
|
|
you may need to build R with the Unless you need cutting-edge R, I would suggest just installing from CRAN: see here for details |
I'll try |
Fair enough. If you do get this working, it would probably be good to add this to the .travis.yml. |
I ran into this problem as well when using R installed with Ubuntu. The actuall error was hidden until I tried loading the shared library directly:
I got it working by using Ubuntu's EDIT:
|
Great lead. On Clear Linux, I seem to have had a similar, but slightly different, problem: julia> using Libdl
julia> Libdl.dlopen("/usr/lib64/R/lib/libR.so")
ERROR: could not load library "/usr/lib64/R/lib/libR.so"
libRblas.so: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen(::String, ::UInt32; throw_error::Bool) at /home/chriselrod/Documents/languages/julia/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109
[2] dlopen [inlined]
[3] dlopen(::String) at /home/chriselrod/Documents/languages/julia/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109
[4] top-level scope at REPL[2]:1
shell> ls /usr/lib64/R/lib
haswell/ libRblas.so* libRlapack.so* libR.so* It couldn't find
A different linking error, and then upon solving it, a different crash. Thankfully RCall seems to work on the Redhat cluster at work, but it doesn't work on any of my personal computers. Eventually I'm supposed to make some of my Julia code callable from |
@chriselrod did you get to the bottom of this? I see it in #433 |
No. As of my last update here, it worked at work but not at home. EDIT: |
Please reopen if still an issue. |
I get a similar segmentation fault when using RCall on the head node of a cluster. RCall works fine when I use the standard R install (3.6.1), but fails when I [22654] signal (11.1): Segmentation fault |
@mattiasvillani I suggest opening a new issue since this one is a bit old and closed. |
I've tried a lot of different values for "R_HOME", and have always seen the same error.
The text was updated successfully, but these errors were encountered: