Trouble importing Calcium_jll

I’m trying to import packages such as AlgebraicNumbers that have Calcium_jll as a dependency. When I try to do so, I get errors of the form

Failed to precompile Calcium_jll [fcfa6d1b-d8ce-59d5-8c0a-c0d7f69e4f40] to "/Users/REDACTED/.julia/compiled/v1.11/Calcium_jll/jl_y9ot8i".
ERROR: LoadError: InitError: could not load library "/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb.dylib"
dlopen(/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb.dylib, 0x0001): tried: '/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb.dylib' (duplicate LC_RPATH '/workspace/destdir/lib'), '/System/Volumes/Preboot/Cryptexes/OS/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb.dylib' (no such file), '/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb.dylib' (duplicate LC_RPATH '/workspace/destdir/lib'), '/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb-2.14.0.dylib' (duplicate LC_RPATH '/workspace/destdir/lib'), '/System/Volumes/Preboot/Cryptexes/OS/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb-2.14.0.dylib' (no such file), '/Users/REDACTED/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb-2.14.0.dylib' (duplicate LC_RPATH '/workspace/destdir/lib')
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:119
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/GfYNv/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ Arb_jll ~/.julia/packages/Arb_jll/vmAQc/src/wrappers/aarch64-apple-darwin.jl:11
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1378
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1366
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1254
  [8] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1210 [inlined]
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:2057
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2527
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [12] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [13] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [15] macro expansion
    @ ./loading.jl:2314 [inlined]
 [16] macro expansion
    @ ./lock.jl:273 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [18] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [19] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [21] include(mod::Module, _path::String)
    @ Base ./Base.jl:562
 [22] top-level scope
    @ ~/.julia/packages/JLLWrappers/GfYNv/src/toplevel_generators.jl:199
 [23] include
    @ ./Base.jl:562 [inlined]
 [24] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2881
 [25] top-level scope
    @ stdin:6
during initialization of module Arb_jll
in expression starting at /Users/REDACTED/.julia/packages/Calcium_jll/mkJYY/src/wrappers/aarch64-apple-darwin.jl:5
in expression starting at /Users/REDACTED/.julia/packages/Calcium_jll/mkJYY/src/Calcium_jll.jl:2
in expression starting at stdin:

I don’t understand what’s going wrong here. Some details:

  • I’m running macOS 15.5 (Sequoia) and julia 1.11.6
  • The same thing happens when I attempt to import Arb_jll or Nemo
  • I can import other packages such as SymPy without issue

Some things I’ve tried:

  • running Pkg.instantiate()
  • running Pkg.precompile()
  • running Pkg.rm(…) for the various offending packages and re-attempting the import/precompiling/instantiating
  • trying an earlier version of julia (specifically 1.10)
  • doing all this in a clean environment
  • deleting ~/.julia and letting it get recreated by starting julia again. Fun fact: this allowed me to import Nemo and Arb_jll first before Calcium_jll, but then attempting to import Calcium_jll messed things up again
  • uninstalling and re-installing all of julia

Any help would be appreciated!

1 Like

Small comfort, but it’s reproducible on the same configuration.
Failed to precompile Calcium_jll [fcfa6d1b-d8ce-59d5-8c0a-c0d7f69e4f40] to “/Users/technocrat/.julia/compiled/v1.11/Calcium_jll/jl_uf2o1F”.
ERROR: LoadError: InitError: could not load library “/Users/technocrat/.julia/artifacts/0aee3fc14042059a9f00ba046404366d5bdd7607/lib/libarb.dylib”

There’s no brew formula, so it has to be installed from source. See this repo. I haven’t tried it, but it seems the only path available. Also, note that Arb has been merged into Flint (which is installable via brew, but it didn’t help.) Calcium_jll itself is no longer maintained, with the last updates four years ago.

AlgebraicNumbers also has a dependency, nemo, which fails.

Do any of the packages in the Algebraic Julia suite serve the same purpose? I think at some point, even if you manage to install AlgebraicNumbers it’s going to break.

1 Like