GLMakie precompilation fails ( julia 1.10.2; WSL2)

Hi,

The precompilation of GLMakie is failing:

show(err)
1-element ExceptionStack:
The following 1 direct dependency failed to precompile:
 
GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
 
Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/home/lgmendes/.julia/compiled/v1.10/GLMakie/jl_ebAnmb".
[3085727] signal (11.1): Segmentation fault
in expression starting at /home/lgmendes/.julia/packages/Makie/8h0bl/precompile/shared-precompile.jl:4
unknown function (ip: 0x7feff6617a96)
unknown function (ip: (nil))
Allocations: 38929905 (Pool: 38904946; Big: 24959); GC: 5
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70
  [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{io::Base.TTY})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:1659
  [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
  [4] precompile
    @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
  [5] #precompile#114
    @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:146 [inlined]
  [6] #invokelatest#2
    @ ./essentials.jl:894 [inlined]
  [7] invokelatest
    @ ./essentials.jl:889 [inlined]
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1963
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1812
[10] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
[11] invoke_in_world
    @ ./essentials.jl:923 [inlined]
[12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1803
[13] macro expansion
    @ ./loading.jl:1790 [inlined]
[14] macro expansion
    @ ./lock.jl:267 [inlined]
[15] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1753
[16] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
[17] invoke_in_world
    @ ./essentials.jl:923 [inlined]
[18] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1746
[19] eval
    @ ./boot.jl:385 [inlined]
[20] eval
    @ ./Base.jl:88 [inlined]
[21] repleval(m::Module, code::Expr, ::String)
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.120.2/scripts/packages/VSCodeServer/src/repl.jl:229
[22] (::VSCodeServer.var"#112#114"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.120.2/scripts/packages/VSCodeServer/src/repl.jl:192
[23] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
[24] with_logger
    @ ./logging.jl:627 [inlined]
[25] (::VSCodeServer.var"#111#113"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.120.2/scripts/packages/VSCodeServer/src/repl.jl:193
[26] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
[27] invokelatest(::Any)
    @ Base ./essentials.jl:889
[28] (::VSCodeServer.var"#64#65")()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.120.2/scripts/packages/VSCodeServer/src/eval.jl:34
has context menu
1 Like

Any reason you are using 1.10.2 (current release is 1.10.5)?

I just checked and for me precompilation of GLMakie on Win11 WSL2 (Ubuntu) fails as expected with the warning that GLFW couldn't create an OpenGL window (as I don’t have any graphics support set up for WSL2)

Just update to 1.10.5.
Now the error is

using GLMakie
β”Œ Warning: Circular dependency detected. Precompilation will be skipped for:
β”‚   CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
β”‚   AlgebraOfGraphics [cbdf2221-f076-402e-a563-3d30da359d67]
β”‚   MLJFlow [7b7b8358-b45c-48ea-a8ef-7ca328ad328f]
β”‚   CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0]
β”‚   FilePathsBaseMmapExt [968c5e7e-8fc3-5f0f-93d2-8a5e0e125e4f]
β”‚   MLJ [add582a8-e3ab-11e8-2d5e-e98b27df1bc7]
β”‚   FilePathsBaseTestExt [36f6b4e4-024d-52bd-a01f-148eb20c09de]
β”‚   GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
β”‚   Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
β”‚   MLFlowClient [64a0f543-368b-4a9a-827a-e71edb2a0b83]
β”‚   FilePaths [8fc22ac5-c921-52a6-82fd-178b2807b824]
β”” @ Pkg.API ~/.julia/juliaup/julia-1.10.5+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:1279
[ Info: Precompiling GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
 
[3104509] signal (11.1): Segmentation fault
in expression starting at /home/lgmendes/.julia/packages/Makie/8h0bl/precompile/shared-precompile.jl:4
unknown function (ip: 0x7f9ccce17a96)
unknown function (ip: (nil))
Allocations: 39767849 (Pool: 39743039; Big: 24810); GC: 61
ERROR: Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/home/lgmendes/.julia/compiled/v1.10/GLMakie/jl_aSnkH9".
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:2468
  [3] compilecache
    @ ./loading.jl:2340 [inlined]
  [4] (::Base.var"#968#969"{Base.PkgId})()
    @ Base ./loading.jl:1974
  [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.5+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
  [6] #mkpidlock#6
    @ ~/.julia/juliaup/julia-1.10.5+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.5+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
  [8] #invokelatest#2
    @ ./essentials.jl:894 [inlined]
  [9] invokelatest
    @ ./essentials.jl:889 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:2983
[11] maybe_cachefile_lock
    @ ./loading.jl:2980 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1970
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1812
[14] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
[15] invoke_in_world
    @ ./essentials.jl:923 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1803
[17] macro expansion
    @ ./loading.jl:1790 [inlined]
[18] macro expansion
    @ ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1753
[20] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
[21] invoke_in_world
    @ ./essentials.jl:923 [inlined]
[22] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1746

When I create a new env and add GLMakie the error is

err
PkgPrecompileError: The following 1 direct dependency failed to precompile:
 
GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a]
 
Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/home/lgmendes/.julia/compiled/v1.10/GLMakie/jl_67cvph".
[3110179] signal (11.1): Segmentation fault
in expression starting at /home/lgmendes/.julia/packages/Makie/8h0bl/precompile/shared-precompile.jl:4
unknown function (ip: 0x7f5182e17a96)
unknown function (ip: (nil))
Allocations: 39523406 (Pool: 39498662; Big: 24744); GC: 6

How did you install Julia?

With juliaup

There’s a known problem on WSL2: Precompilation segfault on WSL2 with GLMakie 0.10.6 Β· Issue #4148 Β· MakieOrg/Makie.jl Β· GitHub
I just noticed we never tagged the fix…

2 Likes

I hope it will be fixed soon.

The problem was solved for Julia 1.10!

However, with the Julia 1.11.1 and WSL2 (tested in two different workstations) I have the following errors:

julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

GLMakie 

Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to "/home/lgmendes/.julia/compiled/v1.11/GLMakie/jl_yTSWk7".
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
D3D12: Removing Device.

[2365] signal 11 (128): Segmentation fault
in expression starting at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/precompiles.jl:15
realloc at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f894f67e99c)
unknown function (ip: 0x7f89501b9532)
unknown function (ip: 0x7f89501b5856)
unknown function (ip: 0x7f894f722932)
unknown function (ip: 0x7f894f6b9459)
unknown function (ip: 0x7f894f6b9b88)
unknown function (ip: 0x7f894f6fe891)
unknown function (ip: 0x7f894f6403da)
unknown function (ip: 0x7f899427f244)
unknown function (ip: 0x7f89942819a0)
glXDestroyContext at /home/lgmendes/.julia/artifacts/37dda4e57d9de95c99d1f8c6b3d8f4eca88c39a2/lib/libGLX.so.0 (unknown line)
destroyContextGLX at /home/lgmendes/.julia/artifacts/3643539f491c217e13c1595daad81dd1426fba07/lib/libglfw.so (unknown line)
_glfwDestroyWindowX11 at /home/lgmendes/.julia/artifacts/3643539f491c217e13c1595daad81dd1426fba07/lib/libglfw.so (unknown line)
glfwDestroyWindow at /home/lgmendes/.julia/artifacts/3643539f491c217e13c1595daad81dd1426fba07/lib/libglfw.so (unknown line)
DestroyWindow at /home/lgmendes/.julia/packages/GLFW/wmoTL/src/glfw3.jl:581 [inlined]
destroy! at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/glwindow.jl:212
destroy! at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/screen.jl:645
unknown function (ip: 0x7f89a6199092)
#closeall#66 at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/screen.jl:695
closeall at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/screen.jl:680 [inlined]
macro expansion at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/precompiles.jl:50 [inlined]
macro expansion at /home/lgmendes/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
macro expansion at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/precompiles.jl:18 [inlined]
macro expansion at /home/lgmendes/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
top-level scope at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/precompiles.jl:16
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:934
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:886
ijl_toplevel_eval_in at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:994
eval at ./boot.jl:430 [inlined]
include_string at ./loading.jl:2643
_include at ./loading.jl:2703
include at ./Base.jl:557
jfptr_include_46643.1 at /home/lgmendes/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
jl_apply at /cache/build/builder-demeter6-6/julialang/julia-master/src/julia.h:2157 [inlined]
jl_f__call_latest at /cache/build/builder-demeter6-6/julialang/julia-master/src/builtins.c:875
include at /home/lgmendes/.julia/packages/GLMakie/JHrMq/src/GLMakie.jl:1
unknown function (ip: 0x7f89a610ada2)
jl_apply at /cache/build/builder-demeter6-6/julialang/julia-master/src/julia.h:2157 [inlined]
do_call at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:126
eval_value at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:223
eval_stmt_value at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:174 [inlined]
eval_body at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:663
jl_interpret_toplevel_thunk at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:821
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:943
jl_eval_module_expr at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:215 [inlined]
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:743
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:886
ijl_toplevel_eval_in at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:994
eval at ./boot.jl:430 [inlined]
include_string at ./loading.jl:2643
_include at ./loading.jl:2703
include at ./Base.jl:557 [inlined]
include_package_for_output at ./loading.jl:2790
jfptr_include_package_for_output_70632.1 at /home/lgmendes/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
jl_apply at /cache/build/builder-demeter6-6/julialang/julia-master/src/julia.h:2157 [inlined]
do_call at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:126
eval_value at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:223
eval_stmt_value at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:174 [inlined]
eval_body at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:663
jl_interpret_toplevel_thunk at /cache/build/builder-demeter6-6/julialang/julia-master/src/interpreter.c:821
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:943
jl_toplevel_eval_flex at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:886
ijl_toplevel_eval_in at /cache/build/builder-demeter6-6/julialang/julia-master/src/toplevel.c:994
eval at ./boot.jl:430 [inlined]
include_string at ./loading.jl:2643
include_string at ./loading.jl:2653 [inlined]
exec_options at ./client.jl:321
_start at ./client.jl:531
jfptr__start_72144.1 at /home/lgmendes/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/lib/julia/sys.so (unknown line)
jl_apply at /cache/build/builder-demeter6-6/julialang/julia-master/src/julia.h:2157 [inlined]
true_main at /cache/build/builder-demeter6-6/julialang/julia-master/src/jlapi.c:900
jl_repl_entrypoint at /cache/build/builder-demeter6-6/julialang/julia-master/src/jlapi.c:1059
main at /cache/build/builder-demeter6-6/julialang/julia-master/cli/loader_exe.c:58
unknown function (ip: 0x7f89bd3fc1c9)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 127200612 (Pool: 127193532; Big: 7080); GC: 3

1 Like

Same over here