Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Julia: Julia 1.9.0 :ERROR: LoadError: Unable to open libLLVM! when llvm is installed in Windows environment

I get an error message when I add SeisIO package in Julia 1.9.0 (Windows 11 environment),which introduces me that"ERROR: Error building LightXML:ERROR: LoadError: Unable to open libLLVM!".Codes are following:

(@v1.9) pkg> add SeisIO; build; precompile
   Resolving package versions...
  No Changes to `C:\Users\47136\.julia\environments\v1.9\Project.toml`
  No Changes to `C:\Users\47136\.julia\environments\v1.9\Manifest.toml`
    Building WebIO ────→ `C:\Users\47136\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\976d0738247f155d0dcd77607edea644f069e1e9\build.log`
    Building Blink ────→ `C:\Users\47136\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\08d0b679fd7caa49e2bca9214b131289e19808c0\build.log`
    Building PlotlyJS ─→ `C:\Users\47136\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\7452869933cd5af22f59557390674e8679ab2338\build.log`
    Building LightXML ─→ `C:\Users\47136\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\be855e3c975b89746b09952407c156b5e4a33a1d\build.log`
ERROR: Error building `LightXML`:
ERROR: LoadError: Unable to open libLLVM!
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] (::BinaryProvider.var"#open_libllvm#124")()
    @ BinaryProvider C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:652
  [3] detect_cxx11_string_abi()
    @ BinaryProvider C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:655
  [4] detect_compiler_abi()
    @ BinaryProvider C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:668
  [5] top-level scope
    @ C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
  [6] include(mod::Module, _path::String)
    @ Base .\Base.jl:457
  [7] include(x::String)
    @ BinaryProvider C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
  [8] top-level scope
    @ C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:12
  [9] include
    @ .\Base.jl:457 [inlined]
 [10] 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::String)
    @ Base .\loading.jl:2012
 [11] top-level scope
    @ stdin:2
in expression starting at C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
in expression starting at C:\Users\47136\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to "C:\\Users\\47136\\.julia\\compiled\\v1.9\\BinaryProvider\\jl_9954.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2262
  [3] compilecache
    @ .\loading.jl:2129 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1772
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1623
  [6] macro expansion
    @ .\loading.jl:1611 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1574
  [9] include(fname::String)
    @ Base.MainInclude .\client.jl:478
 [10] top-level scope
    @ C:\Users\47136\.julia\packages\LightXML\W8FVT\deps\build.jl:1
 [11] include(fname::String)
    @ Base.MainInclude .\client.jl:478
 [12] top-level scope
    @ none:5
in expression starting at C:\Users\47136\.julia\packages\LightXML\W8FVT\deps\build_Zlib.v1.2.11.jl:1
in expression starting at C:\Users\47136\.julia\packages\LightXML\W8FVT\deps\build.jl:1

I have checked libLLVM version by versioninfo:

julia> versioninfo()
Julia Version 1.9.0-rc2
Commit 72aec423c2 (2023-04-01 10:41 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 12 virtual cores
Environment:
  JULIA_PKG_SERVER = https://mirrors.bfsu.edu.cn/julia

I have updated the version of Julia,the version of packages,but I have not instlled the LLVM once again.I hope to find the reason of "unable to open libLLVM"and fix it,and add the SeisIO pacakge to my Julia in win11 environment.thanks!

like image 323
SO501178767 Avatar asked Oct 28 '25 04:10

SO501178767


1 Answers

Simply run @show Base.libllvm_path() under the julia prompt to see if there's a dll file, then copy and rename that file to libLLVM.dll.

julia> @show Base.libllvm_path()
Base.libllvm_path() = Symbol("D:\\Dev\\Julia\\bin\\libLLVM-14jl.dll")
Symbol("D:\\Dev\\Julia\\bin\\libLLVM-14jl.dll")

For Win10, the same problem I met when I built LibPQ with Julia-1.9.2, and this method worked!

like image 112
hxz_rx Avatar answered Oct 30 '25 12:10

hxz_rx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!