Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing precompilation (MbedTLS) on Arch Linux #144

Closed
adigitoleo opened this issue Sep 6, 2021 · 4 comments
Closed

Failing precompilation (MbedTLS) on Arch Linux #144

adigitoleo opened this issue Sep 6, 2021 · 4 comments

Comments

@adigitoleo
Copy link

Hi! Thanks for the package.

I'm currently failing to precompile it on Arch Linux, info below:

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4* (2021-07-14 15:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

I get the following error (emphasis added):

julia> using NetCDF
[ Info: Precompiling NetCDF [30363a11-5582-574a-97bb-aa9a979735b9]
ERROR: LoadError: InitError: could not load library "/home/admin/.julia/artifacts/0a7f440ba143b238cc3dd0def2956d34d76755f3/lib/libnetcdf.so"
**libmbedcrypto.so.5: cannot open shared object file: No such file or directory**
Stacktrace:
 [1] dlopen(s::String, flags::UInt32)
   @ Base.Libc.Libdl ./libdl.jl:114
 [2] macro expansion
   @ ~/.julia/packages/JLLWrappers/bkwIo/src/products/library_generators.jl:54 [inlined]
 [3] __init__()
   @ NetCDF_jll ~/.julia/packages/NetCDF_jll/xjKDT/src/wrappers/x86_64-linux-gnu.jl:14
 [4] top-level scope (repeats 2 times)
   @ none:1
during initialization of module NetCDF_jll
in expression starting at /home/admin/.julia/packages/NetCDF/QftOe/src/NetCDF.jl:1
ERROR: Failed to precompile NetCDF [30363a11-5582-574a-97bb-aa9a979735b9] to /home/admin/.julia/compiled/v1.6/NetCDF/jl_Dp9kFL.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385

It seems like I have a newer version of that library:

❯ ls /usr/lib/libmbedcrypto.so.7
/usr/lib/libmbedcrypto.so.7

❯ ls /usr/lib/libmbedcrypto.so
/usr/lib/libmbedcrypto.so

❯ ls /usr/lib/libmbedcrypto.so.5
ls: cannot access '/usr/lib/libmbedcrypto.so.5': No such file or directory

I'm not yet familiar with how Julia handles shared libraries at all, but I found a related issue on the Julia tracker. Indeed, my standard library MbedTLS is patched to not use versioned sonames:

❮ grep -n 'libmbedcrypto.so' /usr/share/julia/stdlib/v1.6/MbedTLS_jll/src/MbedTLS_jll.jl
34:    const libmbedcrypto = "libmbedcrypto.so"

So, is there a way to tell this package to use that recipe instead of its own? Should that be happening by default? I haven't yet been able to follow where this package loads its mbedtls from.

Thanks again.

@adigitoleo adigitoleo changed the title Failing precompilation on Arch Linux Failing precompilation (MbedTLS) on Arch Linux Sep 6, 2021
@adigitoleo
Copy link
Author

My current workaround was just to create a symlink:

ln -s /usr/lib/libmbedcrypto.so /usr/lib/libmbedcrypto.so.5

All tests are passing with the unversioned .so file.

@ghost
Copy link

ghost commented Sep 13, 2021

Same thing happened to me. A workaround is using the julia-bin from aur.

@prittjam
Copy link

prittjam commented Oct 7, 2021

I have the same problem :(

@adigitoleo
Copy link
Author

This is really a problem with the Arch linux package. A similar issue in another Julia package was closed because it works with official Julia binaries. I've moved to using julia-bin for now, but for anyone else who has this issue @prittjam you might want to notify the Arch packagers. There are some prior trackers of interest:

They seem to have been closed, but I just tried with community/julia again and I still get the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants