I feel this is most likely related to PackageCompiler.jl as the problem appears only when using sysimages. The issue:
Without the sysimage R sees all the shared libraries necessary for plotting:
julia> using RCall
julia> R"grSoftVersion()"
RObject{StrSxp}
cairo cairoFT pango
"1.18.0" "" "1.52.1"
libpng jpeg libtiff
"1.6.43" "8.0" "LIBTIFF, Version 4.6.0"
with sysimage it doesn't julia --sysimage img_plots.so
Sysimage was built with create_sysimage(["Plots"]; sysimage_path="img_plots.so")
Package versions:
(plots_precomp_R_bug) pkg> st
Status `~/plots_precomp_R_bug/Project.toml`
[9b87118b] PackageCompiler v2.1.17
[91a5bcdd] Plots v1.40.2
[6f49c342] RCall v0.14.1
The easiest way to install RCall is to set ENV["R_HOME"] = "*" and then add RCall this will use Conda.jl. I've tried both my system-wide R and fresh installs with the same results. For reference: https://juliainterop.github.io/RCall.jl/stable/installation/
Julia 1.10.2 installed with juliaup
julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, broadwell)
Threads: 1 default, 0 interactive, 1 GC
Narrowed down the issue further, it appears whenever Plots.jl is loaded before RCall.jl so not directly related to PackageCompiler.jl. Will raise an issue in RCall.jl
I feel this is most likely related to
PackageCompiler.jl
as the problem appears only when using sysimages. The issue: Without the sysimage R sees all the shared libraries necessary for plotting:with sysimage it doesn't
julia --sysimage img_plots.so
Sysimage was built with
create_sysimage(["Plots"]; sysimage_path="img_plots.so")
Package versions:The easiest way to install RCall is to set
ENV["R_HOME"] = "*"
and thenadd RCall
this will useConda.jl
. I've tried both my system-wide R and fresh installs with the same results. For reference: https://juliainterop.github.io/RCall.jl/stable/installation/Julia 1.10.2 installed with juliaup
Thanks!