# Linking against libjulia.so v1.6.0 does not link additional dependencies

**URL:** https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409
**Category:** General Usage
**Tags:** question
**Created:** [April 16, 2021, 12:37pm UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409 "2021-04-16T12:37:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Clonkk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/clonkk/32/20088_2.png) [@Clonkk](https://discourse.julialang.org/u/Clonkk)
#### Post date: [April 16, 2021, 12:37pm UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/1 "2021-04-16T12:37:35Z")

</div>

Hello,

I have code which uses the C-API of Julia.

It used to be that linking with libjulia.so in v1.5.3 (my previous installed version) linked against Julia dependencies.  
The output of ldd command on the binaries was for 1.5.3 :

```julia
✔ rcaillaud ~/Workspace/localws/nimjl/examples [devel|+1…2]$ ldd bin/dummy_154 
	linux-vdso.so.1 (0x00007ffcb61c7000)
	libm.so.6 => /lib64/libm.so.6 (0x00007ff30615c000)
	librt.so.1 => /lib64/librt.so.1 (0x00007ff305f54000)
	libjulia.so.1 => /home/rcaillaud/Workspace/julia-1.5.3/lib/libjulia.so.1 (0x00007ff305785000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007ff305581000)
	libc.so.6 => /lib64/libc.so.6 (0x00007ff3051c6000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff306494000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff304fa7000)
	libunwind.so.8 => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libunwind.so.8 (0x00007ff304d6e000)
	libLLVM-9jl.so => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libLLVM-9jl.so (0x00007ff30160b000)
	libstdc++.so.6 => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libstdc++.so.6 (0x00007ff30128d000)
	libgcc_s.so.1 => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libgcc_s.so.1 (0x00007ff301075000)

```

And everything was working flawlessly.

Since switching to v1.6.0 ldd output is :

```julia
✘-1 rcaillaud ~/Workspace/localws/nimjl/examples [devel|+1…2]$ ldd bin/dummy_160 
	linux-vdso.so.1 (0x00007ffd5b9c5000)
	libm.so.6 => /lib64/libm.so.6 (0x00007feb38be9000)
	librt.so.1 => /lib64/librt.so.1 (0x00007feb389e1000)
	libjulia.so.1 => /home/rcaillaud/Workspace/julia-1.6.0/lib/libjulia.so.1 (0x00007feb387bb000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007feb385b7000)
	libc.so.6 => /lib64/libc.so.6 (0x00007feb381fc000)
	/lib64/ld-linux-x86-64.so.2 (0x00007feb38f21000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007feb37fdd000)

```

And the following are missing compared to 1.5.3

```julia
	libunwind.so.8 => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libunwind.so.8 (0x00007ff304d6e000)
	libLLVM-9jl.so => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libLLVM-9jl.so (0x00007ff30160b000)
	libstdc++.so.6 => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libstdc++.so.6 (0x00007ff30128d000)
	libgcc_s.so.1 => /home/rcaillaud/Workspace/julia-1.5.3/lib/julia/libgcc_s.so.1 (0x00007ff301075000)

```

This cause some undefined error symbols :

```julia
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_symbol' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_string_ptr' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_atexit_hook' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_init__threading' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_get_global' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_call0' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_exception_occurred' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_eval_string' are not defined
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: warning: type and size of dynamic symbol `jl_call' are not defined

```

How can I resolve this ?  
Is it necessary for me to link the additionnal dependencies manually from now on or is it a regression introduced in 1.6.0 ?

---

<div class="post-metadata">

### Author: ![Clonkk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/clonkk/32/20088_2.png) [@Clonkk](https://discourse.julialang.org/u/Clonkk)
#### Post date: [April 16, 2021, 3:33pm UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/2 "2021-04-16T15:33:44Z")

</div>

Precision : this happens on OpenSuse.

I do not see this issues on a CI that run on Ubuntu which seems a bit strange to me. Was there any change in the way Julia is linked in 1.6.0 ?

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [April 16, 2021, 3:42pm UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/3 "2021-04-16T15:42:56Z")

</div>

See [https://github.com/JuliaLang/julia/pull/38160](https://github.com/JuliaLang/julia/pull/38160) by @staticfloat

---

<div class="post-metadata">

### Author: ![Clonkk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/clonkk/32/20088_2.png) [@Clonkk](https://discourse.julialang.org/u/Clonkk)
#### Post date: [April 16, 2021, 3:58pm UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/4 "2021-04-16T15:58:13Z")

</div>

Thanks for your answer, I’ve skimmed through the PR.

It is mentionned that all the symbols should be exported in `libjulia.so` yet I’m getting undefined reference to symbols that previously were in libjulia.so 😕

Do I now have to manually call `load_libjulia_internal()` or link `libjulia-internal` ?

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [April 16, 2021, 4:16pm UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/5 "2021-04-16T16:16:41Z")

</div>

I’m not really an expert here. I’m just trying to point you in the right direction. You may need to link libjulia-internal. What happens when you run ldd on `libjulia.so.1`? Does it know how to find `libjulia-internal` ?

You might need to open up an issue.

---

<div class="post-metadata">

### Author: ![Clonkk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/clonkk/32/20088_2.png) [@Clonkk](https://discourse.julialang.org/u/Clonkk)
#### Post date: [April 19, 2021, 7:44am UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/6 "2021-04-19T07:44:35Z")

</div>

> I’m not really an expert here. I’m just trying to point you in the right direction.

I appreciate the help, I’m just a bit disappointed that somethings that worked out the box previously is now broken.

> What happens when you run ldd on `libjulia.so.1` ? Does it know how to find `libjulia-internal` ?

No it doesn’t. Apart from reading the PR is see no link to libjulia-internal

---

<div class="post-metadata">

### Author: ![Clonkk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/clonkk/32/20088_2.png) [@Clonkk](https://discourse.julialang.org/u/Clonkk)
#### Post date: [April 19, 2021, 8:10am UTC](https://discourse.julialang.org/t/linking-against-libjulia-so-v1-6-0-does-not-link-additional-dependencies/59409/7 "2021-04-19T08:10:10Z")

</div>

Follow up to this question on github : [https://github.com/JuliaLang/julia/issues/40524](https://github.com/JuliaLang/julia/issues/40524)
