Can't precompile Makie

What is this? How can I solve it?

julia> using Makie # 0.18.3
[ Info: Precompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
ERROR: LoadError: TypeError: in <:, expected Type, got Vararg
Stacktrace:
  [1] #s10#5
    @ ~/.julia/packages/StaticArrays/1g9bq/src/util.jl:20 [inlined]
  [2] var"#s10#5"(T::Any, ::Any, #unused#::Any)
    @ StaticArrays ./none:0
  [3] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
    @ Core ./boot.jl:582
  [4] macro expansion
    @ ~/.julia/packages/StaticArrays/1g9bq/src/SArray.jl:49 [inlined]
  [5] (StaticArrays.SArray{Tuple{2, 8}})(x::Tuple{Int64, Int64, Float64, Float64, Int64, Int64, Float64, Float64, Int64, Int64, Float64, Float64, Int64, Int64, Float64, Float64})
    @ StaticArrays ~/.julia/packages/StaticArrays/1g9bq/src/SArray.jl:46
  [6] _SA_typed_hvcat(sa::Type, rows::NTuple{8, Int64}, xs::Tuple{Int64, Int64, Float64, Float64, Int64, Int64, Float64, Float64, Int64, Int64, Float64, Float64, Int64, Int64, Float64, Float64})
    @ StaticArrays ~/.julia/packages/StaticArrays/1g9bq/src/initializers.jl:56
  [7] typed_hvcat(::Type{StaticArrays.SA}, ::NTuple{8, Int64}, ::Int64, ::Vararg{Number})
    @ StaticArrays ~/.julia/packages/StaticArrays/1g9bq/src/initializers.jl:59
  [8] top-level scope
    @ ~/.julia/packages/Interpolations/Sxe87/src/lanczos/lanczos_opencv.jl:65
  [9] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [10] include(x::String)
    @ Interpolations ~/.julia/packages/Interpolations/Sxe87/src/Interpolations.jl:1
 [11] top-level scope
    @ ~/.julia/packages/Interpolations/Sxe87/src/Interpolations.jl:444
 [12] include
    @ ./Base.jl:419 [inlined]
 [13] 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
 [14] top-level scope
    @ stdin:1
in expression starting at /home/user/.julia/packages/Interpolations/Sxe87/src/lanczos/lanczos_opencv.jl:65
in expression starting at /home/user/.julia/packages/Interpolations/Sxe87/src/Interpolations.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile Interpolations [a98d9a8b-a2ab-59e6-89dd-64a1c18fca59] to /home/user/.julia/compiled/v1.8/Interpolations/jl_7I56NN.
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
    @ ./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 /home/user/.julia/packages/KernelDensity/bNBAQ/src/KernelDensity.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile KernelDensity [5ab0869b-81aa-558d-bb23-cbf5423bbe9b] to /home/user/.julia/compiled/v1.8/KernelDensity/jl_3hq6A9.
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
    @ ./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 /home/user/.julia/packages/Makie/xhxRd/src/Makie.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] to /home/user/.julia/compiled/v1.8/Makie/jl_FfZG9l.
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] eval
    @ ./boot.jl:368 [inlined]
 [10] eval
    @ ./Base.jl:65 [inlined]
 [11] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:222
 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:186
 [13] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:511
 [14] with_logger
    @ ./logging.jl:623 [inlined]
 [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:187
 [16] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
 [17] invokelatest(::Any)
    @ Base ./essentials.jl:726
 [18] macro expansion
    @ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [19] (::VSCodeServer.var"#61#62")()
    @ VSCodeServer ./task.jl:484

Did you try using a clean environment?
( type ] activate --temp in the REPL to create a temporary environment and then add the package again)

I have had weird precompile errors before but they were always fixed by updating/ reinstalling the environment.

2 Likes

I am trying to use Makie in a project so using a clean environment won’t solve my problem.

I realize this, but as a first diagnosis it is worth to see if the problem still remains. If it is gone in a clean environment one can look at how to fix the environment. If it is not gone it seems to be more complicated and might be due to a package bug or something.

2 Likes

Sometimes deleting Julia’s compilation cache also helps with these things, you could try just deleting the folder for StaticArrays first as that’s where it errors.

2 Likes