"build ThinkJulia" fails on Windows 10 because "unable to open libLLVM!"

Hello,

I am running into an Error message: “LoadError: Unable to open libLLVM!”.

I was trying to install the ThinkJulia package on a Windows 10 for my child. I ran into a problem which and I am not sure how to solve it.

I added the ThinkJulia.jl package as suggested on the book and tried the command “using ThinkJulia” and it didn’t work. Then, I tried “build ThinkJulia” which failed because of ImageMagick. I tried “build ImageMagick” and end up on the same error.

The problem seems to be access or presence of libLLVM which seems to have different solutions on different contexts.

Does anyone knows how to correct this error?

Please, let me know. New to Julia, so, the solution may be obvious to someone, here. I am hoping this is the right place in this forum.

The logs are below.

Thank you!
Castilho


julia> using ThinkJulia
[ Info: Precompiling ThinkJulia [a7f2b756-c18b-4c7f-87da-faca9ac81b29]
[ Info: Skipping precompilation since precompile(false). Importing ThinkJulia [a7f2b756-c18b-4c7f-87da-faca9ac81b29].

(process:4204): GLib-GIO-WARNING **: 09:36:23.251: Unexpectedly, UWP app KDEe.V.Okular_22.401.1031.0_x64__7vt06qxq7ptv8' (AUMId KDEe.V.Okular_7vt06qxq7ptv8!KDEe.V.Okular’) supports 5 extensions but has no verbs
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

(process:15332): GLib-GIO-WARNING **: 09:36:49.360: Unexpectedly, UWP app KDEe.V.Okular_22.401.1031.0_x64__7vt06qxq7ptv8' (AUMId KDEe.V.Okular_7vt06qxq7ptv8!KDEe.V.Okular’) supports 5 extensions but has no verbs
ERROR: LoadError: ThinkJulia not installed properly, run Pkg.build(“ThinkJulia”), restart Julia and try again
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] top-level scope
@ C:\Users\CurrentUser.julia\packages\ThinkJulia\REhsz\src\ThinkJulia.jl:15
[3] include
@ .\Base.jl:419 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1367
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
in expression starting at C:\Users\CurrentUser.julia\packages\ThinkJulia\REhsz\src\ThinkJulia.jl:1

julia>


(@v1.8) pkg> build ThinkJulia
Building GR ─────────→ C:\Users\CurrentUser\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\7ea6f715b7caa10d7ee16f1cfcd12f3ccc74116a\build.log
Building Plots ──────→ C:\Users\CurrentUser\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\484ade6d734feb43c06721c689155eb4aa3259f5\build.log
Building ImageMagick → C:\Users\CurrentUser\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\54dfa264804aefc44630c96619474e683a522d78\build.log
ERROR: Error building ImageMagick:
ERROR: LoadError: Unable to open libLLVM!
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] (::BinaryProvider.var"#open_libllvm#124")()
@ BinaryProvider C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:652
[3] detect_cxx11_string_abi()
@ BinaryProvider C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:655
[4] detect_compiler_abi()
@ BinaryProvider C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:668
[5] top-level scope
@ C:\Users\CurrentUser.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\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
[8] top-level scope
@ C:\Users\CurrentUser.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::String)
@ Base .\loading.jl:1554
[11] top-level scope
@ stdin:1
in expression starting at C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
in expression starting at C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to C:\Users\CurrentUser.julia\compiled\v1.8\BinaryProvider\jl_8B6A.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:1705
[3] compilecache
@ .\loading.jl:1649 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
[9] include(fname::String)
@ Base.MainInclude .\client.jl:476
[10] top-level scope
@ none:5
in expression starting at C:\Users\CurrentUser.julia\packages\ImageMagick\adWD8\deps\build.jl:1

(@v1.8) pkg>


(@v1.8) pkg> build ImageMagick
Building ImageMagick → C:\Users\CurrentUser\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\54dfa264804aefc44630c96619474e683a522d78\build.log
ERROR: Error building ImageMagick:
ERROR: LoadError: Unable to open libLLVM!
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] (::BinaryProvider.var"#open_libllvm#124")()
@ BinaryProvider C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:652
[3] detect_cxx11_string_abi()
@ BinaryProvider C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:655
[4] detect_compiler_abi()
@ BinaryProvider C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:668
[5] top-level scope
@ C:\Users\CurrentUser.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\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
[8] top-level scope
@ C:\Users\CurrentUser.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::String)
@ Base .\loading.jl:1554
[11] top-level scope
@ stdin:1
in expression starting at C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685
in expression starting at C:\Users\CurrentUser.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to C:\Users\CurrentUser.julia\compiled\v1.8\BinaryProvider\jl_203B.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:1705
[3] compilecache
@ .\loading.jl:1649 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
[9] include(fname::String)
@ Base.MainInclude .\client.jl:476
[10] top-level scope
@ none:5
in expression starting at C:\Users\CurrentUser.julia\packages\ImageMagick\adWD8\deps\build.jl:1

(@v1.8) pkg>

Welcome! Unfortunately BinaryProvider is an old package which doesn’t work on new versions of Julia (it used to use rely on some internals of Julia) and, crucially, on new hardware that it was invented after the package stopped being maintained (like Apple Silicon).

This PR should help (but will have to wait for the author to try it out):

The trouble with books is that they don’t get updates.

Since the following paragraph was written (3 or 4 years ago, apparently):

The easiest way to run Julia code is by going to https://juliabox.com and starting a free session. Both the REPL and a notebook interface are available. If you want to have Julia locally installed on your computer, you can download JuliaProfor free from Julia Computing. It consists of a recent Julia version, the Juno interactive development environment based on Atom, and a number of preinstalled Julia packages.

quite a lot has changed; Julia development moves quickly.

While you should be able to read and learn from a lot of the book’s explanatory content today, some of the specific code examples might not work, particularly if you can’t get ThinkJulia.jl to install.

1 Like