BinaryProvider.jl icon indicating copy to clipboard operation
BinaryProvider.jl copied to clipboard

Fails to find libLLVM on anaconda

Open sargas opened this issue 6 years ago • 8 comments

I'm not sure if this is a problem with the conda-forge julia package or this package, but using a package that requires BinaryProvider.jl with Anaconda fails to find the libLLVM symbols.

On a Linux system with docker, this can be reproduced by running:

docker run continuumio/anaconda /bin/bash -c "/opt/conda/bin/conda install -c conda-forge -yq julia && julia -e 'using Pkg; Pkg.add(\"ZMQ\")'"

This results in the following error:

  Building ZMQ → `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
┌ Error: Error building `ZMQ`: 
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] (::getfield(BinaryProvider, Symbol("#open_libllvm#114")))() at /root/.julia/packages/BinaryProvider/cVlaj/src/PlatformNames.jl:649
│  [3] detect_cxx11_string_abi() at /root/.julia/packages/BinaryProvider/cVlaj/src/PlatformNames.jl:652
│  [4] detect_compiler_abi() at /root/.julia/packages/BinaryProvider/cVlaj/src/PlatformNames.jl:665
│  [5] top-level scope at none:0
│  [6] include at ./boot.jl:317 [inlined]
│  [7] include_relative(::Module, ::String) at ./loading.jl:1038
│  [8] include at ./sysimg.jl:29 [inlined]
│  [9] include(::String) at /root/.julia/packages/BinaryProvider/cVlaj/src/BinaryProvider.jl:1
│  [10] top-level scope at none:0
│  [11] include at ./boot.jl:317 [inlined]
│  [12] include_relative(::Module, ::String) at ./loading.jl:1038
│  [13] include(::Module, ::String) at ./sysimg.jl:29
│  [14] top-level scope at none:2
│  [15] eval at ./boot.jl:319 [inlined]
│  [16] eval(::Expr) at ./client.jl:389
│  [17] top-level scope at ./none:3
│ in expression starting at /root/.julia/packages/BinaryProvider/cVlaj/src/PlatformNames.jl:682
│ in expression starting at /root/.julia/packages/BinaryProvider/cVlaj/src/BinaryProvider.jl:12
│ ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to /root/.julia/compiled/v1.0/BinaryProvider/ek6VZ.ji.
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] macro expansion at ./logging.jl:313 [inlined]
│  [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
│  [4] _require(::Base.PkgId) at ./logging.jl:311
│  [5] require(::Base.PkgId) at ./loading.jl:852
│  [6] macro expansion at ./logging.jl:311 [inlined]
│  [7] require(::Module, ::Symbol) at ./loading.jl:834
│  [8] include at ./boot.jl:317 [inlined]
│  [9] include_relative(::Module, ::String) at ./loading.jl:1038
│  [10] include(::Module, ::String) at ./sysimg.jl:29
│  [11] include(::String) at ./client.jl:388
│  [12] top-level scope at none:0
│ in expression starting at /root/.julia/packages/ZMQ/ABGOx/deps/build.jl:1
└ @ Pkg.Operations /home/conda/feedstock_root/build_artifacts/julia_1534540929950/work/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068

This was not the case for Julia 0.6.1, although that used BinaryProvider v0.3.3

sargas avatar Oct 14 '18 12:10 sargas

I have the same issue with MacOS 10.12 + anaconda + Julia 1.01 (installed with conda), when trying to install a jupyter notebook kernal.

  Building MbedTLS → `~/.julia/packages/MbedTLS/CwGUN/deps/build.log`
┌ Error: Error building `MbedTLS`:
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ in expression starting at /Users/EvergreenFu/.julia/packages/BinaryProvider/1nGWd/src/PlatformNames.jl:683
│ in expression starting at /Users/EvergreenFu/.julia/packages/BinaryProvider/1nGWd/src/BinaryProvider.jl:12
│ ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to /Users/EvergreenFu/.julia/compiled/v1.0/BinaryProvider/ek6VZ.ji.
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] macro expansion at ./logging.jl:313 [inlined]
│  [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1187
│  [4] _require(::Base.PkgId) at ./logging.jl:311
│  [5] require(::Base.PkgId) at ./loading.jl:855
│  [6] macro expansion at ./logging.jl:311 [inlined]
│  [7] require(::Module, ::Symbol) at ./loading.jl:837
│  [8] include at ./boot.jl:317 [inlined]
│  [9] include_relative(::Module, ::String) at ./loading.jl:1041
│  [10] include(::Module, ::String) at ./sysimg.jl:29
│ in expression starting at /Users/EvergreenFu/.julia/packages/MbedTLS/CwGUN/deps/build.jl:1
└ @ Pkg.Operations /Users/distiller/miniconda3/conda-bld/julia_1539821288417/work/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069

EvergreenTree avatar Oct 20 '18 19:10 EvergreenTree

[Solved] Now I tried to use a non-conda-installed version of julia 1.0.1, and the problem disappeared.

EvergreenTree avatar Oct 20 '18 20:10 EvergreenTree

Is there any solution to this using the conda-installed version?

rabernat avatar Oct 30 '18 14:10 rabernat

Same error here. Unable to build ZMQ and MbedTLS.

tiagopereira avatar Nov 02 '18 04:11 tiagopereira

Same here. Any update?

alibeyram avatar Dec 13 '18 00:12 alibeyram

Same here. My purpose was to use DifferentialEquations.jl in jupyter, in my setup (precompiled binary package julia 1.0.3; anaconda environment 'julia' with installed julia 1.0.2, conda 4.5.12).

# in precompiled binary package julia (not the conda env julia):
julia
julia> Pkg.add("DifferentialEquations")

[...]

  Building Rmath ───────────→ `~/.julia/packages/Rmath/Py9gH/deps/build.log`
┌ Error: Error building `Rmath`: 
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ Stacktrace:

[...]

┌ Error: Error building `SpecialFunctions`: 
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ Stacktrace:

[...]

┌ Error: Error building `Arpack`: 
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ Stacktrace:

[...]

┌ Error: Error building `SymEngine`: 
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ Stacktrace:

[...]

┌ Error: Error building `Sundials`: 
│ ERROR: LoadError: LoadError: Unable to open libLLVM!
│ Stacktrace:

[...]

UPDATE: this advice for symlinking llvm fixed the LLVM issue. Although my original problem (install DifferentialEquations.jl in conda julia) now failed because of another issue I call the 'Arpack error'. If you have the same purpose and run into that error as well at this point, here is how I fixed it.

Irratzo avatar Dec 24 '18 14:12 Irratzo

Maybe this issue should be merged with (or vice versa) https://github.com/JuliaLang/julia/issues/29720 ?

It also seems to be discussed here: https://github.com/conda-forge/julia-feedstock/issues/60

krinsman avatar Jan 17 '19 03:01 krinsman

Since this is an issue with the conda-forge julia package, the solution might be found in the current build script for that package, found here:

https://github.com/conda-forge/julia-feedstock/blob/master/recipe/build.sh

In particular, note that the package does not install the conda-forge llvm package for Julia to use by default, and that the following flag is used in the make: USE_SYSTEM_LLVM=0.

krinsman avatar Jan 17 '19 05:01 krinsman