Errors precompiling HomotopyContinuation.jl

I am trying to install the HomotopyContinuation.jl package, but I get an error when I try to precompile this package. This is because the following packages throw an error when precomiling:
✗ MPFR_jll
✗ FLINT_jll
✗ MPC_jll
✗ Arb_jll
✗ SymEngine_jll
✗ Arblib
I installed julia on fedora using dnf. The entire error log is given below. What would you guys recommend I try next?

julia> import Pkg; Pkg.precompile()
Precompiling project...
  ✗ MPFR_jll
  ✗ FLINT_jll
  ✗ MPC_jll
  ✗ Arb_jll
  ✗ SymEngine_jll
  ✗ Arblib
  ✗ HomotopyContinuation
  0 dependencies successfully precompiled in 8 seconds. 153 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

HomotopyContinuation [f213a82b-91d6-5c5d-acf7-10f1c761b327]

Failed to precompile HomotopyContinuation [f213a82b-91d6-5c5d-acf7-10f1c761b327] to "/home/simon/.julia/compiled/v1.9/HomotopyContinuation/jl_ci4Dwi".
ERROR: 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.9/GMP_jll/src/GMP_jll.jl:36
 [2] top-level scope
   @ ~/.julia/packages/JLLWrappers/pG9bm/src/toplevel_generators.jl:192
 [3] top-level scope
   @ stdin:3
during initialization of module GMP_jll
in expression starting at /home/simon/.julia/packages/FLINT_jll/qlrkP/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/simon/.julia/packages/FLINT_jll/qlrkP/src/FLINT_jll.jl:2
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile FLINT_jll [e134572f-a0d5-539d-bddf-3cad8db41a82] to "/home/simon/.julia/compiled/v1.9/FLINT_jll/jl_1xhfMi".
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/JLLWrappers/pG9bm/src/toplevel_generators.jl:192
 [2] top-level scope
   @ stdin:3
in expression starting at /home/simon/.julia/packages/Arb_jll/vmAQc/src/wrappers/x86_64-linux-gnu.jl:4
in expression starting at /home/simon/.julia/packages/Arb_jll/vmAQc/src/Arb_jll.jl:2
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile Arb_jll [d9960996-1013-53c9-9ba4-74a4155039c3] to "/home/simon/.julia/compiled/v1.9/Arb_jll/jl_cYZiCA".
Stacktrace:
 [1] top-level scope
   @ stdin:3
in expression starting at /home/simon/.julia/packages/Arblib/ZnCj1/src/Arblib.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile Arblib [fb37089c-8514-4489-9461-98f9c8763369] to "/home/simon/.julia/compiled/v1.9/Arblib/jl_VQIaSt".
Stacktrace:
 [1] top-level scope
   @ stdin:3
in expression starting at /home/simon/.julia/packages/HomotopyContinuation/zGEDd/src/HomotopyContinuation.jl:1
in expression starting at stdin:3
Stacktrace:
 [1] top-level scope
   @ REPL[1]:1

I’d recommend uninstalling Julia and reinstalling it using either one of the official binaries or perhaps better using juliaup by copying this incantation into a terminal of your choice:

$ curl -fsSL https://install.julialang.org | sh

Usually package maintainer replace shared libraries used by Julia with the standard ones of their distribution which will cause compilation failures like the one you are seeing.

1 Like