Issue compiling GR_jll on hpc

I searched available modules on this hpc cluster and nothing like “libqt” showed up so I’m assuming this is always in the path.

For some reason I still get this error:

julia> using GR_jll
[ Info: Precompiling GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9]
ERROR: LoadError: LoadError: InitError: could not load library "/data/homezvol2/mkarikom/.julia/artifacts/7835210e9722f2d04d4e74972925b5c43d9cfcaa/lib/libQt5Concurrent.so"
/opt/apps/anaconda/2020.07/lib/libQt5Core.so.5: version `Qt_5.15' not found (required by /data/homezvol2/mkarikom/.julia/artifacts/7835210e9722f2d04d4e74972925b5c43d9cfcaa/lib/libQt5Concurrent.so)
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/bkwIo/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ Qt5Base_jll ~/.julia/packages/Qt5Base_jll/Ks8eF/src/wrappers/x86_64-linux-gnu-cxx11.jl:31
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:674
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:760
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:998
  [8] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:914
  [9] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:901
 [10] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
 [11] top-level scope
    @ ~/.julia/packages/JLLWrappers/bkwIo/src/toplevel_generators.jl:170
 [12] include
    @ ./Base.jl:386 [inlined]
 [13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1213
 [14] top-level scope
    @ none:1
 [15] eval
    @ ./boot.jl:360 [inlined]
 [16] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [17] top-level scope
    @ none:1
during initialization of module Qt5Base_jll
in expression starting at /data/homezvol2/mkarikom/.julia/packages/GR_jll/lXOy4/src/wrappers/x86_64-linux-gnu-cxx11.jl:13
in expression starting at /data/homezvol2/mkarikom/.julia/packages/GR_jll/lXOy4/src/GR_jll.jl:2
ERROR: Failed to precompile GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9] to /data/homezvol2/mkarikom/.julia/compiled/v1.6/GR_jll/jl_Scucb1.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1360
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1306
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1021
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901

You’re mixing anaconda libraries with julia libraries. My bet is that on the variable LD_LIBRARY_PATH being set.

1 Like

Thanks, @giordano. I don’t explicitly set ENV["LD_LIBRARY_PATH"] in my script.
Do you have any suggestion on how to fix this?
Here is what julia has:

julia> ENV["LD_LIBRARY_PATH"]
"/opt/apps/julia/1.6.0/lib:/opt/apps/clang/10.0.0/lib:/opt/apps/llvm/10.0.0/lib:/opt/apps/R/4.0.4/lib64:/opt/apps/gcc/8.4.0/lib64:/opt/apps/gcc/8.4.0/lib:/opt/apps/gcc/8.4.0/lib/gcc/x86_64-pc-linux-gnu/8.4.0:/opt/apps/OpenBLAS/0.3.6/lib"

You don’t need to set it inside Julia, but before starting it:

LD_LIBRARY_PATH="" julia

or

export LD_LIBRARY_PATH=""
julia
1 Like

Thanks, @giordano, this worked great!

On several HPC systems I have worked with, the module system tends to be used to make packages like Julia available. Often module ends up setting LD_LIBRARY_PATH because some system administrator thinks it would be helpful.

In the case of Julia, it is not very useful unless there is a problem.