"Unable to open libLLVM!" error trying to create_sysimage in 1.8.0

I updated to Julia 1.8.0 this morning, ran ]update, and tried to rebuild my sysimage. I noticed that there appears to be something wrong with the BinaryProvider package. I explicitly added the package ]add BinaryProvider and tried running create_sysimage again and see the error a little more clearly. This is on Windows 11 running Julia either in a VSCode repl or in a git bash terminal

julia> PackageCompiler.create_sysimage(usings; sysimage_path=NewImagePath, precompile_statements_file=precompFiltered)
Precompiling project...
  ✗ BinaryProvider
  0 dependencies successfully precompiled in 2 seconds. 291 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232]

Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to C:\Users\joel\.julia\compiled\v1.8\BinaryProvider\jl_45D8.tmp.
ERROR: LoadError: Unable to open libLLVM!
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] (::BinaryProvider.var"#open_libllvm#124")()
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:652
  [3] detect_cxx11_string_abi()
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:655
  [4] detect_compiler_abi()
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:668
  [5] top-level scope
    @ C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
  [6] include(mod::Module, _path::String)
    @ Base .\Base.jl:419
  [7] include(x::String)
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
  [8] top-level scope
    @ C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:12
  [9] include
    @ .\Base.jl:419 [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, UInt64}}, source::Nothing)
    @ Base .\loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
in expression starting at C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
in expression starting at stdin:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types C:\app\dev\Julia\share\julia\stdlib\v1.8\Pkg\src\Types.jl:67
 [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{String}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API C:\app\dev\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:1427
 [3] precompile
   @ C:\app\dev\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:1058 [inlined]
 [4] #precompile#225
   @ C:\app\dev\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:1057 [inlined]
 [5] precompile (repeats 2 times)
   @ C:\app\dev\Julia\share\julia\stdlib\v1.8\Pkg\src\API.jl:1057 [inlined]
 [6] top-level scope
   @ none:1
ERROR: failed process: Process(setenv(`'C:\app\dev\Julia\bin\julia.exe' --color=yes --startup-file=no '--sysimage=C:\app\dev\Julia\lib\julia\sys.dll' -e 'using Pkg; Pkg.precompile()'`,["PATH=C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Oculus\\Support\\oculus-runtime;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\app\\dev\\Git\\cmd;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\app\\dev\\Python\\Scripts\\;C:\\app\\dev\\Python\\;C:\\Users\\joel\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\joel\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\joel\\.dotnet\\tools;C:\\app\\dev\\VSCode\\bin;C:\\app\\dev\\Haskell\\ghcup\\bin;C:\\app\\dev\\Haskell\\cabal\\bin;C:\\app\\dev\\Julia\\bin", "USERDOMAIN_ROAMINGPROFILE=AMANAGARE", "HOMEPATH=\\Users\\joel", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\WINDOWS", "APPDATA=C:\\Users\\joel\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "PROGRAMDATA=C:\\ProgramData"  …  "VSCODE_GIT_ASKPASS_MAIN=c:\\app\\dev\\VSCode\\resources\\app\\extensions\\git\\dist\\askpass-main.js", "PROGRAMFILES=C:\\Program Files", "CHROME_CRASHPAD_PIPE_NAME=\\\\.\\pipe\\crashpad_2440_JBSGVBRFZMVWACJR", "LOGONSERVER=\\\\AMANAGARE", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "ORIGINAL_XDG_CURRENT_DESKTOP=undefined", "FONTCONFIG_PATH=C:\\Users\\joel\\.julia\\artifacts\\c916a560fa109a4db3d6938a8ab1a6a8b4a09731\\etc\\fonts", "JULIA_LOAD_PATH=c:\\data\\julia\\journey;@stdlib", "SYSTEMDRIVE=C:", "PROCESSOR_ARCHITECTURE=AMD64"]), ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ .\process.jl:565 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base .\process.jl:480
 [3] run
   @ .\process.jl:477 [inlined]
 [4] ensurecompiled(project::String, packages::Vector{String}, sysimage::String)
   @ PackageCompiler C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\src\PackageCompiler.jl:226
 [5] create_sysimage(packages::Vector{String}; sysimage_path::String, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::String, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String)
   @ PackageCompiler C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\src\PackageCompiler.jl:465
 [6] top-level scope
   @ REPL[37]:1

This is the original output before adding BinaryProvider:

Summary
julia> PackageCompiler.create_sysimage(usings; sysimage_path=NewImagePath, precompile_statements_file=precompFiltered)
Precompiling project...
  ✗ BinaryProvider
  0 dependencies successfully precompiled in 2 seconds. 291 already precompiled.
⢰ [00m:40s] PackageCompiler: compiling incremental system imageUnable to open libLLVM!
Stacktrace:
⣄ [00m:40s] PackageCompiler: compiling incremental system imageString)
    @ Base .\error.jl:35
  [2] (::BinaryProvider.var"#open_libllvm#124")()
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:652
  [3] detect_cxx11_string_abi()
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:655
  [4] detect_compiler_abi()
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:668
  [5] top-level scope
    @ C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
  [6] include(mod::Module, _path::String)
    @ Base .\Base.jl:419
  [7] include(x::String)
    @ BinaryProvider C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
  [8] top-level scope
    @ C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:12
  [9] include
    @ .\Base.jl:419 [inlined]
 [10] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1367
 [11] _require_prelocked(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1200
 [12] macro expansion
    @ .\lock.jl:223 [inlined]
 [13] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1195
 [14] top-level scope
    @ C:\temp\jl_jOZSLgv6Ho:295
in expression starting at C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
in expression starting at C:\Users\joel\.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
in expression starting at C:\temp\jl_jOZSLgv6Ho:295
✖ [00m:41s] PackageCompiler: compiling incremental system image
ERROR: failed process: Process(`'C:\app\dev\Julia\bin\julia.exe' --color=yes --startup-file=no --cpu-target=native -O3 '--sysimage=C:\app\dev\Julia\lib\julia\sys.dll' '--project=C:\data\julia\journey' '--output-o=C:\temp\jl_lKH2Pq9Y9a.o' 'C:\temp\jl_jOZSLgv6Ho'`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ .\process.jl:565 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base .\process.jl:480
 [3] run
   @ .\process.jl:477 [inlined]
 [4] #14
   @ C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\ext\TerminalSpinners.jl:157 [inlined]
 [5] spin(f::PackageCompiler.var"#14#15"{Cmd}, s::PackageCompiler.TerminalSpinners.Spinner{Base.TTY})
   @ PackageCompiler.TerminalSpinners C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\ext\TerminalSpinners.jl:164
 [6] macro expansion
   @ C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\ext\TerminalSpinners.jl:157 [inlined]
 [7] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String, incremental::Bool)
   @ PackageCompiler C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\src\PackageCompiler.jl:359
 [8] create_sysimage(packages::Vector{String}; sysimage_path::String, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::String, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String)
   @ PackageCompiler C:\Users\joel\.julia\packages\PackageCompiler\YNnEB\src\PackageCompiler.jl:510
 [9] top-level scope
   @ REPL[34]:1

julia> VERSION
v"1.8.0"

BinaryProvider.jl has not been updated since 2020 and is no longer in current use by the Julia ecosystem. Do you have a package that depends on it?

What version of Julia are you updating from? Could you share your Project.toml?

That’s good to know. I looked at the manifest and the dependency was added because I just added the Transformers package. So, it’s probably not related to the upgrade to 1.8.

The manifest shows:

[[deps.Transformers]]
deps = ["AbstractTrees", "Adapt", "BSON", "BytePairEncoding", "CUDA", "ChainRulesCore", "DataDeps", "DataStructures", "Dates", "DelimitedFiles", "Fetch", "Flux", "FuncPipelines", "Functors", "HTTP", "HuggingFaceApi", "InternedStrings", "JSON", "LightXML", "LinearAlgebra", "MacroTools", "Markdown", "NNlib", "NNlibCUDA", "NeuralAttentionlib", "Pickle", "Pkg", "PrimitiveOneHot", "Random", "Requires", "SHA", "Static", "Statistics", "StructWalk", "TextEncodeBase", "Unicode", "ValSplit", "WordTokenizers", "ZipFile"]
git-tree-sha1 = "d5b27f265e12bfaeab2bdf990c7abddf6155a3e2"
uuid = "21ca0261-441d-5938-ace7-c90938fde4d4"
version = "0.1.20"

Which includes DataDeps (both directly and via WordTokenizers):

[[deps.DataDeps]]
deps = ["BinaryProvider", "HTTP", "Libdl", "Reexport", "SHA", "p7zip_jll"]
git-tree-sha1 = "e299d8267135ef2f9c941a764006697082c1e7e8"
uuid = "124859b0-ceae-595e-8997-d05f6a7a8dfe"
version = "0.7.8"

and so BinaryProvider:

[[deps.BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.10"

This comment by Frames (@oxinabox) seems relevant. Perhaps the BinaryBuilder dependency can be eliminated?
https://github.com/oxinabox/DataDeps.jl/issues/152#issuecomment-1119537599

Perhaps you could see if @CarloLucibello 's branch works for you:

https://github.com/oxinabox/DataDeps.jl/pull/159

https://github.com/CarloLucibello/DataDeps.jl/tree/cl/bb

using Pkg
pkg"add https://github.com/CarloLucibello/DataDeps.jl#cl/bb"

Thanks for the help. When I first tried to add that branch, it gave an error about unsolvable dependency resolution. I removed a couple things and then was able to install that branch of DataDeps. I searched around and grabbed the latest branch for BlackBoxOptim and then I was able to add things back.

After that, create_sysimage successfully ran. All working.

Thanks!

Your BlackBoxOptim link is broken.