Skip to content
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

Trouble precompiling PhyloPlots #6

Closed
eckofoid opened this issue Sep 14, 2020 · 9 comments
Closed

Trouble precompiling PhyloPlots #6

eckofoid opened this issue Sep 14, 2020 · 9 comments

Comments

@eckofoid
Copy link

I had no trouble precompiling PhyloPlots on my MacBook Plus. My identically configured Mac Mini yields the following:

julia> import PhyloPlots
[ Info: Precompiling PhyloPlots [c0d5b6db-e3fc-52bc-a87d-1d050989ed3b]
FATAL ERROR: Symbol "ccalllib_libR.dylib574"not found
signal (6): Abort trap: 6
in expression starting at /Users/roth9lab/.julia/packages/PhyloPlots/CBmgP/src/PhyloPlots.jl:14
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 24212978 (Pool: 24204272; Big: 8706); GC: 18
ERROR: Failed to precompile PhyloPlots [c0d5b6db-e3fc-52bc-a87d-1d050989ed3b] to /Users/roth9lab/.julia/compiled/v1.5/PhyloPlots/Pfae6_BC6hT.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

I can't find ccalllib_libR.dylib574 on either machine. I have reinstalled R and am using the same version Julia on both (1.5.0). I always work from a conda environment running Python 2.7.15, well isolated from the rest of the machine.

Any suggestions would be greatly appreciated.

@cecileane
Copy link
Member

Which julia version as you using? You can type VERSION to get julia to tell you. Also, what do you see if you type ] to get in package (pkg) mode, and then type status?

@eckofoid
Copy link
Author

eckofoid commented Sep 15, 2020 via email

@cecileane
Copy link
Member

Thanks! Given the error message about libR, I wonder if it's an issue with using RCall. What happens if you try

using RCall

?
If you get the same error when trying to use RCall, it might something about the version of RCall (do you have version 0.13.6 of RCall on your other machine, or the more recent v0.13.7?), or it might be that RCall is not finding your path to your R installation.

@eckofoid
Copy link
Author

Here's the output:

julia> using RCall
[ Info: Precompiling RCall [6f49c342-dc21-5d91-9882-a32aef131414]
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] top-level scope at /Users/roth9lab/.julia/packages/RCall/jOnwc/src/RCall.jl:36
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include(::Module, ::String) at ./Base.jl:368
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:331 [inlined]
 [7] eval(::Expr) at ./client.jl:467
 [8] top-level scope at ./none:3
in expression starting at /Users/roth9lab/.julia/packages/RCall/jOnwc/src/RCall.jl:33
ERROR: Failed to precompile RCall [6f49c342-dc21-5d91-9882-a32aef131414] to /Users/roth9lab/.julia/compiled/v1.5/RCall/8GFyb_BC6hT.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

@eckofoid
Copy link
Author

I should have included the following:

(@v1.5) pkg> build RCall
   Building Conda → `~/.julia/packages/Conda/3rPhK/deps/build.log`
   Building RCall → `~/.julia/packages/RCall/jOnwc/deps/build.log`
┌ Error: Error building `RCall`:
│ ERROR: could not load library "/opt/anaconda3/envs/python2/lib/R/lib/libR.dylib"
│ dlopen(/opt/anaconda3/envs/python2/lib/R/lib/libR.dylib, 1): Library not loaded: @rpath/libpcre2-8.0.dylib
│   Referenced from: /opt/anaconda3/envs/python2/lib/R/lib/libR.dylib
│   Reason: Incompatible library version: libR.dylib requires version 11.0.0 or later, but libpcre2-8.dylib provides version 8.0.0
│ ERROR: LoadError: Try adding /opt/anaconda3/envs/python2/lib/R/lib to the "LD_LIBRARY_PATH" environmental variable and restarting Julia.
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] validate_libR(::String) at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/setup.jl:26
│  [3] locate_libR(::SubString{String}) at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/setup.jl:43
│  [4] top-level scope at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/build.jl:53
│  [5] include(::String) at ./client.jl:457
│  [6] top-level scope at none:5
│ in expression starting at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/build.jl:11
│ caused by [exception 1]
│ could not load library "/opt/anaconda3/envs/python2/lib/R/lib/libR.dylib"
│ dlopen(/opt/anaconda3/envs/python2/lib/R/lib/libR.dylib, 1): Library not loaded: @rpath/libpcre2-8.0.dylib
│   Referenced from: /opt/anaconda3/envs/python2/lib/R/lib/libR.dylib
│   Reason: Incompatible library version: libR.dylib requires version 11.0.0 or later, but libpcre2-8.dylib provides version 8.0.0
│ Stacktrace:
│  [1] dlopen(::String, ::UInt32; throw_error::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109
│  [2] dlopen at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
│  [3] validate_libR(::String) at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/setup.jl:16
│  [4] locate_libR(::SubString{String}) at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/setup.jl:43
│  [5] top-level scope at /Users/roth9lab/.julia/packages/RCall/jOnwc/deps/build.jl:53
│  [6] include(::String) at ./client.jl:457
│  [7] top-level scope at none:5
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:942

@eckofoid
Copy link
Author

Also, by the way:

(python2) RothLab:Desktop roth9lab$ echo $LD_LIBRARY_PATH
/opt/anaconda3/envs/python2/lib/R/lib:/sw/share/rtf2latex2e/

I had set this up in my ~/.profile.

@cecileane
Copy link
Member

Perhaps install R from outside anaconda? else check related issues on RCall, like #389, or check the "R_HOME" environment variable?

@eckofoid
Copy link
Author

Hi Cécile,

Your reply reminded me that the Mac comes with R preinstalled. Conda may have been loading libraries from the Mac side by accident. I removed the conda R package at which point I could then import RCall without error from Julia. I then imported PhyloPlots to force a precompilation, and everything now works.

Thank you so much for your patient help!

@cecileane
Copy link
Member

wow, that was tricky. congratulations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants