I am using an up to date arch linux distro. I’ve downloaded julia-1.6.7 from the official website and set the path. When I run julia in a console I get the following error:
┌ Warning: CHOLMOD version incompatibility
│
│ Julia was compiled with CHOLMOD version 3.0.13. It is
│ currently linked with version 4.0.4.
│ This might cause Julia to terminate when working with
│ sparse matrix factorizations, e.g. solving systems of
│ equations with \.
│
│ It is recommended that you use Julia with the same major
│ version of CHOLMOD as the one used during the build, or
│ download the generic binaries from www.julialang.org,
│ which ship with the correct versions of all dependencies.
└ @ SuiteSparse.CHOLMOD /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/SuiteSparse/src/cholmod.jl:115
┌ Error: Error during initialization of module CHOLMOD
│ exception =
│ could not load symbol "SuiteSparse_config":
│ /lib/libsuitesparseconfig.so.7: undefined symbol: SuiteSparse_config
│ Stacktrace:
│ [1] __init__()
│ @ SuiteSparse.CHOLMOD /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/SuiteSparse/src/cholmod.jl:179
└ @ SuiteSparse.CHOLMOD /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/SuiteSparse/src/cholmod.jl:187
fatal: error thrown and no exception handler available.
InitError(mod=:LibCURL_jll, error=ErrorException("could not load library "libcurl.so"
/lib/libcurl.so: undefined symbol: libssh2_session_set_read_timeout"))
jl_errorf at /buildworker/worker/package_linux64/build/src/rtutils.c:77
jl_load_dynamic_library at /buildworker/worker/package_linux64/build/src/dlload.c:281
#dlopen#3 at ./libdl.jl:114
dlopen at ./libdl.jl:114 [inlined]
dlopen at ./libdl.jl:114
jfptr_dlopen_38581.clone_1 at /home/hany/julia-1.6.7/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2237 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2419
__init__ at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LibCURL_jll/src/LibCURL_jll.jl:30
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2237 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2419
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1703 [inlined]
jl_module_run_initializer at /buildworker/worker/package_linux64/build/src/toplevel.c:72
_julia_init at /buildworker/worker/package_linux64/build/src/init.c:794
repl_entrypoint at /buildworker/worker/package_linux64/build/src/jlapi.c:696
main at julia (unknown line)
unknown function (ip: 0x7ff052a27ccf)
__libc_start_main at /lib/libc.so.6 (unknown line)
unknown function (ip: 0x4007d8)
Any ideas? Weirdly enough, if I run “sudo julia”, the REPL launches.
Do you have any particular setting of LD_PRELOAD or LD_LIBRARY_PATH? How/where did you install Julia to? Does it work correctly with a newer Julia version (the LTS is really only expected to be used if you can’t upgrade for other reasons - newer minor versions are very stable)?
Would be interesting to know which one did the trick. I think Julia 1.9 ships with libcholmod.4, hence wouldn’t complain about loading a system installed copy of the library. (edit: no, 1.10 does)
On the other hand, the Julia binary should have an RPATH set, so the loader wouldn’t bother about looking in LD_LIBRARY_PATH in the first place…? Unless the lib/ folder in the julia directory was missing or incomplete.
Would be interesting to know which one did the trick
I am not very sure. If I keep my custom LD_LIBRARY_PATH and use 1.9.3, I still get the CHOLMOD warning but instead of the libcurl exception I get a segfault.
btw un-setting the LD_LIBRARY_PATH solves the problem for both 1.6.7 and 1.9.3. The REPL launches in both cases with no warnings. I am not sure I made that point clear before.
Okay, so the loader looks in LD_LIBRARY_PATH first find libcholmod because you have /lib in that path. Is that really necessary by the way?
And now I think I figured out why. Apparently, the binary not only defines RPATH (which is deprecated anyway), but RUNPATH too.
From the manpage of ld.so:
If a shared object dependency does not contain a slash, then it is searched for in the following order:
(1)
Using the directories specified in the DT_RPATH dynamic section attribute of the binary if present and DT_RUNPATH attribute does not exist. Use of DT_RPATH is deprecated.
(2)
Using the environment variable LD_LIBRARY_PATH, unless the executable is being run in secure-execution mode (see below), in which case this variable is ignored.
(3)
Using the directories specified in the DT_RUNPATH dynamic section attribute of the binary if present.
I.e. if RUNPATH is specified, LD_LIBRARY_PATH takes precedent.
Thus the question from above: Do you need /lib and /usr/lib in there?
No, I don’t really need it. I think this was a legacy workaround for compiling mex files in MATLAB, which I don’t need anymore. Thanks for helping nailing it down.