Docker and shared library loading problem

I’m running Julia in Docker container built from ubuntu image with Julia executable on top. Everything runs fine except of loading shared library. Here is the log:

paul@desktop:~$ docker run -it julia
root@1c3ef9183e75:/# julia $JULIA_PATH/subt.jl
ERROR: LoadError: could not load library "/usr/lib/libsimc.so"
libsubt_communication_client.so: cannot open shared object file: No such file or directory
....
root@1c3ef9183e75:/# find / -name libsimc.so
/usr/lib/libsimc.so

The loader complains that /usr/lib/libsimc.so file doesn’t exist, but the file is there as evidenced by the next command. Trying to call a function needing this library from the REPL results in the same problem.

The same tests run just fine outside of Docker.

It is because it cannot find libsubt_communication_client.so, a dependent library. Check for this file instead (find / -name libsubt_communication_client.so).

2 Likes

Thank you. That was the problem.

BTW, what is loader’s search path? LD_LIBRARY_PATH?

According to this page, Base.DL_LOAD_PATH is used first, then the system’s load path searched so you can push the dynamic library paths to the DL_LOAD_PATH. I think LD_LIBRARY_PATH is ignored at the moment.

1 Like