3

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!

2 Answers2

2

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!

hxz_rx
  • 37
  • 2
0

SeisIO seems to not have been updated in over 2 years at the time of writing this answer. The error you describe is a known issue reported here:

https://github.com/jpjones76/SeisIO.jl/issues/93

You could try installing the package on an older Julia version - the repo suggests that the package author tried to get the tests to pass for Julia 1.6 at some point and this didn't work, so it might work on Julia 1.5 or 1.4.

Alternatively - or concurrently - you could try contacting the author to see if they are interested in updating the package to work with the most recent Julia releases.

Nils Gudat
  • 13,222
  • 3
  • 39
  • 60
  • Thank you for your answer. Your answer has given me a lot of help. At present, with the guidance of others, the installation issue has been resolved. However, new and thorny issues have emerged during the testing phase, and the test log records show that a certain function has malfunctioned. I have submitted the specific details of the problem to the author through the Github Issue section, but have not received a response yet. If there is no news yet, I plan to contact the original author via email for consultation. Thank you again for your generous help. Best wishes from China to you. – SO501178767 Apr 21 '23 at 13:18