Genie, Nettle and Nettle_jll keep failing to precompile

Hello everyone.

I’ve been struggling with Genie on my laptop running Fedora for a while now. It worked once upon a time, but now it seems to fail to precompile along with Nettle and Nettle_jll. Is anybody else having this problem? I’ve uninstalled and reinstalled both Julia and the packages in question. I’ve searched for a solution on google, but I can’t see any evidence of anyone with the same problem. I’m a bit of a beginner so I’m sorry if the answer is something obvious.

I’ve posted the output below.

[ Info: Precompiling Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e]
ERROR: LoadError: LoadError: InitError: could not load library "libgmpxx.so.4"
libgmpxx.so.4: cannot open shared object file: No such file or directory
Stacktrace:
 [1] __init__()
   @ GMP_jll /usr/share/julia/stdlib/v1.6/GMP_jll/src/GMP_jll.jl:36
 [2] top-level scope
   @ ~/.julia/packages/JLLWrappers/bkwIo/src/toplevel_generators.jl:170
 [3] top-level scope (repeats 2 times)
   @ none:1
during initialization of module GMP_jll
in expression starting at /home/oliver/.julia/packages/Nettle_jll/LjWzs/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/oliver/.julia/packages/Nettle_jll/LjWzs/src/Nettle_jll.jl:2
ERROR: LoadError: Failed to precompile Nettle_jll [4c82536e-c426-54e4-b420-14f461c4ed8b] to /home/oliver/.julia/compiled/v1.6/Nettle_jll/jl_40qsXH.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/oliver/.julia/packages/Nettle/NhQ2s/src/Nettle.jl:1
ERROR: LoadError: LoadError: Failed to precompile Nettle [49dea1ee-f6fa-5aa6-9a11-8816cee7d4b9] to /home/oliver/.julia/compiled/v1.6/Nettle/jl_qlADqE.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
 [2] include(x::String)
   @ Genie ~/.julia/packages/Genie/xDyfL/src/Genie.jl:4
 [3] top-level scope
   @ ~/.julia/packages/Genie/xDyfL/src/Genie.jl:32
 [4] top-level scope (repeats 2 times)
   @ none:1
in expression starting at /home/oliver/.julia/packages/Genie/xDyfL/src/Encryption.jl:1
in expression starting at /home/oliver/.julia/packages/Genie/xDyfL/src/Genie.jl:1
ERROR: Failed to precompile Genie [c43c736e-a2d1-11e8-161f-af95117fbd1e] to /home/oliver/.julia/compiled/v1.6/Genie/jl_CsvylH.
Stacktrace:
 [1] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1385
1 Like

Welcome! How did you install Julia? libgmpxx.so.4 should be part of the Julia distribution. This is for example the case for the official binaries.

My educated guess is that you installed Julia from the repositories of a Linux distribution? If so, you should complain with the maintainer of the package, or switch to using the official binaries (which is a better option anyways).

Actually, since you mentioned this is Fedora, @nalimilan may be the one to ping.

Managed to fix the problem with the help of the helpful folks on the Humans of Julia Discord server.

Installing gmp-devel fixed the problem.

2 Likes

Thank you so much. Facing the same problem here.