JeffreySarnoff/ArbNumerics.jl

Unable to build ArbNumerics on Mac Catalina, Julia 1.4.x

StrangeRay opened this issue · 6 comments

After a routine ] update, an attempt to using ArbNumerics produced a LoadError and precompilation error:

julia> using ArbNumerics
[ Info: Precompiling ArbNumerics [7e558dbc-694d-5a72-987c-6f4ebed21442]
ERROR: LoadError: LoadError: IOError: realpath: no such file or directory (ENOENT)
Stacktrace:
 [1] uv_error at ./libuv.jl:97 [inlined]
 [2] realpath(::String) at ./path.jl:429
...
in expression starting at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/src/support/arblib.jl:43
in expression starting at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/src/ArbNumerics.jl:145
ERROR: Failed to precompile ArbNumerics [7e558dbc-694d-5a72-987c-6f4ebed21442] to /Users/StrangeHeim/.julia/compiled/v1.4/ArbNumerics/Xn6ml_KjlZN.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
...

(This, by the way, happens on MacOS Catalina v. 10.15.4 under Julia 1.4.0 and 1.4.1.)

I can remove ArbNumerics and add it back in at will, but when I attempt to build it, I get

julia> ] build ArbNumerics
   Building ArbNumerics  `~/.julia/packages/ArbNumerics/tV06g/deps/build.log`
┌ Error: Error building `ArbNumerics`: 
│ ERROR: LoadError: LoadError: LibraryProduct(nothing, ["libgmp"], :libgmp, "Prefix(/Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] write_deps_file(::String, ::Array{LibraryProduct,1}; verbose::Bool, isolate::Bool) at /Users/StrangeHeim/.julia/packages/BinaryProvider/GeAtj/src/Products.jl:419
│  [3] top-level scope at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/build_GMP.v6.1.2.jl:48
│  [4] include(::Module, ::String) at ./Base.jl:377
│  [5] include(::String) at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/build.jl:41
│  [6] top-level scope at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/build.jl:41
│  [7] eval(::Module, ::Any) at ./boot.jl:331
│  [8] top-level scope at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/build.jl:41
│  [9] include(::String) at ./client.jl:439
│  [10] top-level scope at none:5in expression starting at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/build_GMP.v6.1.2.jl:48in expression starting at /Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/build.jl:15
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:892

Line 23 of build_GMP.v6.1.2.jl is

    MacOS(:x86_64) => ("$bin_prefix/GMP.v6.1.2.x86_64-apple-darwin14.tar.gz", "ed7ccfb5b7797277ef8c3640624ee6df4587c08a6be5ba5d7cbec4a0c6ee9b49")

I was able to download GMP v 6.1.2 manually from https://github.com/JuliaPackaging/Yggdrasil/releases/download/GMP-v6.1.2-1
The download included the libraries libgmp.dylib, libgmpxx.dylib (s),libgmp.10.dylib (s), libgmp.la, libgmpxx.4.dylib, and libgmpxx.la. The first two seem to be symlinks.

I don't know how to proceed with trouble-shooting from this point. Any suggestions?

Oops... it's libgmp.dylib and libgmpxx.dylib that look like symlinks, not libgmp.10.dylib.

You should not need to build it explicitly:
try removing it, adding it and then using it.
Also see this (it may be relevant) #41

I don't have a Mac. If you continue to have problems, I will try to look deeper.

Try putting the *.la files you downloaded in
/Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/usr/lib
and putting the *.dynlib files in
/Users/StrangeHeim/.julia/packages/ArbNumerics/tV06g/deps/usr/bin
Then julia> using ArbNumerics
let me know what happens

From the #41 thread:

Progress: I've got a stand-alone AN working in a new environment sandbox. Steps: In a terminal:

$ mkdir ~/Experiments/Julia/buildAN
$ cd  ~/Experiments/Julia/buildAN
$ julia

followed by

]
(@v1.4) pkg> activate .
(buildAN) pkg> add ArbNumerics
^C
julia> using ArbNumerics
julia> ArbFloat(2)*pi
6.283185307179586476925286766559

Now let's see if I can use AN in the default env:

]
(@v1.4) pkg> add ArbNumerics
(@v1.4) pkg> ^C
julia> using ArbNumerics
[ Info: Precompiling ArbNumerics [7e558dbc-694d-5a72-987c-6f4ebed21442]

julia> ArbFloat(2)pi
6.283185307179586476925286766559

Yep!

Thanks, @newptcai and Jeffrey.

This worked on MacOS and Linux but I have no clue why. There's a message in here somewhere for the Pkg maintainers but it is outside the hearing range of mere Julia mortals like me. :-)

This is a duplicate of #41, which has since been re-opened.