# Launch Failure

**URL:** <https://discourse.julialang.org/t/launch-failure/103694>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [September 9, 2023, 6:28am UTC](https://discourse.julialang.org/t/launch-failure/103694 "2023-09-09T06:28:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanyas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hanyas/32/51078_2.png) [@hanyas](https://discourse.julialang.org/u/hanyas)\
**Post date:** [September 9, 2023, 6:28am UTC](https://discourse.julialang.org/t/launch-failure/103694/1 "2023-09-09T06:28:05Z")

</div>

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:

```julia
┌ 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.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 9, 2023, 7:51am UTC](https://discourse.julialang.org/t/launch-failure/103694/2 "2023-09-09T07:51:42Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![hanyas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hanyas/32/51078_2.png) [@hanyas](https://discourse.julialang.org/u/hanyas)\
**Post date:** [September 9, 2023, 8:11am UTC](https://discourse.julialang.org/t/launch-failure/103694/3 "2023-09-09T08:11:01Z")

</div>

I did have LD\_LIBRARY\_PATH set to /usr/lib in my zshrc for a different reason. Julia is  
in my home directory.

Un-setting the library path and using the latest julia 1.9.3 appears to solve the CHOLMOD warning and the missing library issue.

---

<div class="post-metadata">

**Author:** ![skleinbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skleinbo/32/36080_2.png) [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Post date:** [September 9, 2023, 8:22am UTC](https://discourse.julialang.org/t/launch-failure/103694/4 "2023-09-09T08:22:53Z")

</div>

> [@hanyas](#):
>
> Un-setting the library path and using the latest julia 1.9.3 appears to solve the CHOLMOD warning and the missing library issue.

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.

I’m possibly getting this wrong.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 9, 2023, 9:01am UTC](https://discourse.julialang.org/t/launch-failure/103694/5 "2023-09-09T09:01:49Z")

</div>

I’m not sure 1.6.7 had the RPATH set correctly. There was some work on that since then, if I recall correctly.

---

<div class="post-metadata">

**Author:** ![hanyas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hanyas/32/51078_2.png) [@hanyas](https://discourse.julialang.org/u/hanyas)\
**Post date:** [September 9, 2023, 9:29am UTC](https://discourse.julialang.org/t/launch-failure/103694/6 "2023-09-09T09:29:25Z")

</div>

> 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.

For reference these are the commands I had zshrc

```julia
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib

```

---

<div class="post-metadata">

**Author:** ![skleinbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skleinbo/32/36080_2.png) [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Post date:** [September 9, 2023, 10:00am UTC](https://discourse.julialang.org/t/launch-failure/103694/7 "2023-09-09T10:00:00Z")

</div>

Has for me.

```julia
skleinbo $ ~/.julia/juliaup/julia-1.6.7+0.x64.linux.gnu/bin  readelf -d ./julia

Dynamic section at offset 0xdc8 contains 29 entries:
  Tag Type Name/Value
 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED) Shared library: [libjulia.so.1]
 0x000000000000000f (RPATH) Library rpath: [$ORIGIN/../lib:$ORIGIN/../lib/julia]

```

> [@hanyas](#):
>
> If I keep my custom LD\_LIBRARY\_PATH and use 1.9.3, I still get the CHOLMOD warning

Can you launch `LD_DEBUG=libs julia 2> libsdebug` and have a look for `libcholmod.so` in `libsdebug`? That should tell you where the loader is searching.

---

<div class="post-metadata">

**Author:** ![hanyas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hanyas/32/51078_2.png) [@hanyas](https://discourse.julialang.org/u/hanyas)\
**Post date:** [September 9, 2023, 11:04am UTC](https://discourse.julialang.org/t/launch-failure/103694/8 "2023-09-09T11:04:25Z")

</div>

It appears to be searching in the LD\_PATH\_LIBRARY first then in RPATH? That happens in 1.6.7 and 1.9.3

```julia
    104456:	find library=libcholmod [0]; searching
    104456: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2::/lib (LD_LIBRARY_PATH)
    104456: trying file=glibc-hwcaps/x86-64-v3/libcholmod
    104456: trying file=glibc-hwcaps/x86-64-v2/libcholmod
    104456: trying file=libcholmod
    104456: trying file=/lib/libcholmod
    104456: search path=/usr/lib (system search path)
    104456: trying file=/usr/lib/libcholmod
    104456: search path=/home/hany/julia-1.6.7/bin/../lib/julia (RPATH from file julia)
    104456: trying file=/home/hany/julia-1.6.7/bin/../lib/julia/libcholmod
    104456: search path=/home/hany/julia-1.6.7/bin/../lib/julia/.. (RUNPATH from file /home/hany/julia-1.6.7/bin/../lib/julia/libjulia-internal.so.1)
    104456: trying file=/home/hany/julia-1.6.7/bin/../lib/julia/../libcholmod
    104456: search cache=/etc/ld.so.cache
    104456: search path=/usr/lib (system search path)
    104456: trying file=/usr/lib/libcholmod
    104456:	
    104456:	find library=libcholmod.so [0]; searching
    104456: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2::/lib (LD_LIBRARY_PATH)
    104456: trying file=glibc-hwcaps/x86-64-v3/libcholmod.so
    104456: trying file=glibc-hwcaps/x86-64-v2/libcholmod.so
    104456: trying file=libcholmod.so
    104456: trying file=/lib/libcholmod.so

```

---

<div class="post-metadata">

**Author:** ![hanyas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hanyas/32/51078_2.png) [@hanyas](https://discourse.julialang.org/u/hanyas)\
**Post date:** [September 9, 2023, 11:31am UTC](https://discourse.julialang.org/t/launch-failure/103694/9 "2023-09-09T11:31:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![skleinbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skleinbo/32/36080_2.png) [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Post date:** [September 9, 2023, 11:51am UTC](https://discourse.julialang.org/t/launch-failure/103694/10 "2023-09-09T11:51:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hanyas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hanyas/32/51078_2.png) [@hanyas](https://discourse.julialang.org/u/hanyas)\
**Post date:** [September 9, 2023, 11:55am UTC](https://discourse.julialang.org/t/launch-failure/103694/11 "2023-09-09T11:55:18Z")

</div>

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.
