Precompilation error when installing Makie/GLMakie

When trying to add Makie, precompilation errors are triggered (with GLMakie, Pango_jll and GLMakie also show up in this list):

Precompiling project...
  ✗ OpenEXR
  ✗ Cairo_jll
  ✗ HarfBuzz_jll
  ✗ libass_jll
  ✗ FFMPEG_jll
  ✗ Makie
  2 dependencies successfully precompiled in 46 seconds. 275 already precompiled.
  6 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

err shows:

Failed to precompile Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] to "C:\\Users\\Win\\.julia\\compiled\\v1.11\\Makie\\jl_9323.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\Win\.julia\artifacts\ce4261864aeaa78b205a3f6fb750be4c4afe9b4b\bin\libfribidi-0.dll"
The specified module could not be found.
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl .\libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl .\libdl.jl:119
  [3] macro expansion
    @ C:\Users\Win\.julia\packages\JLLWrappers\GfYNv\src\products\library_generators.jl:63 [inlined]
  [4] __init__()
    @ FriBidi_jll C:\Users\Win\.julia\packages\FriBidi_jll\oCK8P\src\wrappers\x86_64-w64-mingw32.jl:9
  [5] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1378
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1366
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base .\loading.jl:1254
  [8] _include_from_serialized (repeats 2 times)
    @ .\loading.jl:1210 [inlined]
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base .\loading.jl:2057
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2527
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2388
 [12] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [13] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2375
 [15] macro expansion
    @ .\loading.jl:2314 [inlined]
 [16] macro expansion
    @ .\lock.jl:273 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2271
 [18] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [19] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2260
 [21] include(mod::Module, _path::String)
    @ Base .\Base.jl:557
 [22] top-level scope
    @ C:\Users\Win\.julia\packages\JLLWrappers\GfYNv\src\toplevel_generators.jl:199
 [23] include
    @ .\Base.jl:557 [inlined]
 [24] 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:2881
 [25] top-level scope
    @ stdin:6
during initialization of module FriBidi_jll
in expression starting at C:\Users\Win\.julia\packages\libass_jll\lHiRd\src\wrappers\x86_64-w64-mingw32.jl:5
in expression starting at C:\Users\Win\.julia\packages\libass_jll\lHiRd\src\libass_jll.jl:2
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0] to "C:\\Users\\Win\\.julia\\compiled\\v1.11\\libass_jll\\jl_9A65.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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base .\loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base .\loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\Win\AppData\Local\Programs\Julia-1.11.2\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
  [5] #mkpidlock#6
    @ C:\Users\Win\AppData\Local\Programs\Julia-1.11.2\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\Win\AppData\Local\Programs\Julia-1.11.2\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
  [7] #invokelatest#2
    @ .\essentials.jl:1057 [inlined]
  [8] invokelatest
    @ .\essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:3698
 [10] maybe_cachefile_lock
    @ .\loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2388
 [13] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2375
 [16] macro expansion
    @ .\loading.jl:2314 [inlined]
 [17] macro expansion
    @ .\lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2271
 [19] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2260
 [22] include(mod::Module, _path::String)
    @ Base .\Base.jl:557
 [23] top-level scope
    @ C:\Users\Win\.julia\packages\JLLWrappers\GfYNv\src\toplevel_generators.jl:199
 [24] include
    @ .\Base.jl:557 [inlined]
 [25] 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:2881
 [26] top-level scope
    @ stdin:6
in expression starting at C:\Users\Win\.julia\packages\FFMPEG_jll\x6Plb\src\wrappers\x86_64-w64-mingw32.jl:4
in expression starting at C:\Users\Win\.julia\packages\FFMPEG_jll\x6Plb\src\FFMPEG_jll.jl:2
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] to "C:\\Users\\Win\\.julia\\compiled\\v1.11\\FFMPEG_jll\\jl_996B.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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base .\loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base .\loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\Win\AppData\Local\Programs\Julia-1.11.2\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
  [5] #mkpidlock#6
    @ C:\Users\Win\AppData\Local\Programs\Julia-1.11.2\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\Win\AppData\Local\Programs\Julia-1.11.2\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
  [7] #invokelatest#2
    @ .\essentials.jl:1057 [inlined]
  [8] invokelatest
    @ .\essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:3698
 [10] maybe_cachefile_lock
    @ .\loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2388
 [13] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2375
 [16] macro expansion
    @ .\loading.jl:2314 [inlined]
 [17] macro expansion
    @ .\lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2271
 [19] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2260
 [22] include
    @ .\Base.jl:557 [inlined]
 [23] 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::Nothing)
    @ Base .\loading.jl:2881
 [24] top-level scope
    @ stdin:6
in expression starting at C:\Users\Win\.julia\packages\Makie\ux0Te\src\Makie.jl:1
in expression starting at stdin:

I tried adding versions of Makie/GLMakie other than the latest ones, but similar problems occurred. versioninfo() is this, but the same happens in Julia 1.11.3:

Julia Version 1.11.2
Commit 5e9a32e7af (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 28 × Intel(R) Core(TM) i7-14700F
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 28 virtual cores)

Did you try to install it in a clean environment?

mkdir test
cd test
julia --project=.

and then in Julia

using Pkg
pkg"add GlMakie"

?

If you want to use GLMakie don’t add Makie itself as direct depenceny.

Same issue here even in a clean environment.

Does an environment contain all compiled packages separate from the global environment? It appears an environment only contains Manifest.toml and Projects.toml which just point to specific artifacts for that environment. I probably need to read up how Julia environment is supposed to work, but didn’t have an issue in v1.10. Is it possible that the GLMakie (and its dependecies) already installed for v1.10 may be clashing with v1.11 installation?

Precompiling project…
✗ Fontconfig_jll
✗ Cairo_jll
✗ WebP
✗ HarfBuzz_jll
✗ libass_jll
✗ Pango_jll
✗ FFMPEG_jll
✗ Makie
✗ GLMakie
0 dependencies successfully precompiled in 67 seconds. 278 already precompiled.
9 dependencies errored.
For a report of the errors see julia> err. To retry use pkg> precompile

For each Julia version packages are installed separately.

So a clash between versions is not possible.

You could try to delete the folder:

.julia/compiled

and see if this helps.

You could also try to rename the folder .jula to .jula.bak and try if that helps, but that would mean you have to install all packages again.

The global environments you can find in the folder .julia/environments, separated by Julia version.

An environment contains the names and version numbers of the packages for your project, stored in the file Manifest.toml. The packages itself are shared between all environments (if they have the same version number) and you can find them in .julia/packages and .julia/compiled

If you want to use a local environment you must start Julia with:

julia --project

If you open a folder in VSCode you will be asked which environment you want to use.

Thank you. I tried to rename .julia, and GLMakie installation came through without a problem. I probably messed up the global environment in the past as I recently started having some issue with installing packages even in v1.10.

Deleting .julia/compiled and starting the session with julia --project didn’t work.

So do you consider the issue as solved?

Please also have a look at: Working with Julia projects | Julia programming notes

A fresh julia installation on my computer fixed the issue. Probably something I messed up in the environments and installations a long time ago. Thanks for the responses still.

As long as you are using juliaup a fresh Julia installation is mostly not needed, but deleting or renaming the folder .julia can fix broken package installation issues. I just realized that juliaup installs Julia also in the .julia/juliaup folder, so yes, this could be called a new installation, but it happens automatically when you launch julia the next time after deleting/renaming the .julia folder.

this looks more like an artifact issue so deleting ~\.julia\artifacts is what could fix it…
it would be good to figure out what’s happening with Fontconfig_jll/OpenEXR though.
Maybe add them in a new environment and see if they compile

I think so for me at least. I only had a vague idea about the julia project. Thanks for sharing the link. It really cleared up some of the misconceptions/questions I had, and it appears to be a great way to manage my scripts written for different applications.