For seemingly no reason, I encountered an error with GR_jll failing to compile. Nothing changed on my system as far as I can tell. This ultimately lead the error below after upgrading from Julia 1.10 to 1.10.1.
Precompiling project...
✗ Libtiff_jll
✗ GR_jll
✗ Plots
✗ Plots → UnitfulExt
176 dependencies successfully precompiled in 196 seconds. 6 already precompiled.
1 dependency had output during precompilation:
┌ GR
│ ERROR: LoadError: InitError: could not load library "C:\Users\christopher.fisher\.julia\artifacts\e0047abf10ac78869271eb320a815a4c4f0945fd\bin\liblzma-5.dll"
│ Access is denied.
I tried following the advice in this post,and this post. I found an open issue on the topic here.
I tried the following, which lead to an error:
julia> Base.compilecache(Base.identify_package("GR"))
ERROR: MethodError: no method matching compilecache(::Nothing)
Closest candidates are:
compilecache(::Base.PkgId, ::String)
@ Base loading.jl:2335
compilecache(::Base.PkgId)
@ Base loading.jl:2326
compilecache(::Base.PkgId, ::String, ::IO, ::IO, ::Bool)
@ Base loading.jl:2335
...
Stacktrace:
[1] top-level scope
@ REPL[4]:1
This abrupt change in behavior is very frustrating. Any help would be appreciated.
Thank you for your reply. Sorry I did not see the step of deleting the artifacts. I deleted .julia/artifacts and tried again with Julia 1.9.4. Unfortunately, that did not work:
Error Trace
Is there any other course of action?
julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa29 (2023-11-14 08:46 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, tigerlake)
Threads: 4 on 8 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 4
Downloaded artifact: Pixman
Downloaded artifact: XML2
Downloaded artifact: Gettext
Downloaded artifact: OpenSSL
Downloaded artifact: FFMPEG
Downloaded artifact: Libgcrypt
Downloaded artifact: Xorg_xkeyboard_config
Downloaded artifact: LLVMOpenMP
Downloaded artifact: LAME
Downloaded artifact: Libiconv
Downloaded artifact: Qt6Base
Downloaded artifact: libvorbis
Downloaded artifact: Glib
Precompiling project...
✗ Plots
✗ Plots → UnitfulExt
102 dependencies successfully precompiled in 123 seconds. 83 already precompiled.
2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages
julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: UndefVarError: `GR_jll` not defined
Stacktrace:
[1] __init__()
@ GR.GRPreferences C:\Users\christopher.fisher\.julia\packages\GR\xEQ37\src\preferences.jl:64
[2] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1115
[3] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base .\loading.jl:1061
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
@ Base .\loading.jl:1506
[5] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1783
[6] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1660
[7] macro expansion
@ .\loading.jl:1648 [inlined]
[8] macro expansion
@ .\lock.jl:267 [inlined]
[9] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611
[10] top-level scope
@ C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\backends.jl:380
[11] eval
@ .\boot.jl:370 [inlined]
[12] _initialize_backend(pkg::Plots.GRBackend)
@ Plots C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\backends.jl:379
[13] backend(pkg::Plots.GRBackend)
@ Plots C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\backends.jl:244
[14] backend(sym::Symbol)
@ Plots C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\backends.jl:254
[15] load_default_backend()
@ Plots C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\backends.jl:201
[16] backend()
@ Plots C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\backends.jl:232
[17] top-level scope
@ C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\init.jl:91
[18] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[19] include(x::String)
@ Plots C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\Plots.jl:1
[20] top-level scope
@ C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\Plots.jl:176
[21] include
@ .\Base.jl:457 [inlined]
[22] 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:2049
[23] top-level scope
@ stdin:3
during initialization of module GRPreferences
in expression starting at C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\init.jl:91
in expression starting at C:\Users\christopher.fisher\.julia\packages\Plots\HyyIK\src\Plots.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "C:\\Users\\christopher.fisher\\.julia\\compiled\\v1.9\\Plots\\jl_D605.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:2294
[3] compilecache
@ .\loading.jl:2167 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1805
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1660
[6] macro expansion
@ .\loading.jl:1648 [inlined]
[7] macro expansion
@ .\lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611
[9] eval
@ .\boot.jl:370 [inlined]
[10] eval
@ .\Base.jl:68 [inlined]
[11] repleval(m::Module, code::Expr, #unused#::String)
@ VSCodeServer c:\Users\christopher.fisher\.vscode\extensions\julialang.language-julia-1.73.2\scripts\packages\VSCodeServer\src\repl.jl:229
[12] (::VSCodeServer.var"#110#112"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer c:\Users\christopher.fisher\.vscode\extensions\julialang.language-julia-1.73.2\scripts\packages\VSCodeServer\src\repl.jl:192
[13] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging .\logging.jl:514
[14] with_logger
@ .\logging.jl:626 [inlined]
[15] (::VSCodeServer.var"#109#111"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer c:\Users\christopher.fisher\.vscode\extensions\julialang.language-julia-1.73.2\scripts\packages\VSCodeServer\src\repl.jl:193
[16] #invokelatest#2
@ .\essentials.jl:819 [inlined]
[17] invokelatest(::Any)
@ Base .\essentials.jl:816
[18] macro expansion
@ c:\Users\christopher.fisher\.vscode\extensions\julialang.language-julia-1.73.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
[19] (::VSCodeServer.var"#62#63")()
@ VSCodeServer .\task.jl:514
julia> Base.compilecache(Base.identify_package("GR"))
ERROR: MethodError: no method matching compilecache(::Nothing)
Closest candidates are:
compilecache(::Base.PkgId)
@ Base loading.jl:2153
compilecache(::Base.PkgId, ::IO)
@ Base loading.jl:2153
compilecache(::Base.PkgId, ::IO, ::IO)
@ Base loading.jl:2153
...
Stacktrace:
[1] top-level scope
@ REPL[6]:1
Yes. The error is different. So you are right that one problem was fixed. However, the proposed solution for ERROR: LoadError: InitError: UndefVarError: GR_jll not defined did not work, which means I cannot make plots. At the bottom of the error trace you can see the following:
julia> Base.compilecache(Base.identify_package("GR"))
ERROR: MethodError: no method matching compilecache(::Nothing)
Closest candidates are:
compilecache(::Base.PkgId)
@ Base loading.jl:2153
compilecache(::Base.PkgId, ::IO)
@ Base loading.jl:2153
compilecache(::Base.PkgId, ::IO, ::IO)
@ Base loading.jl:2153
...
Stacktrace:
[1] top-level scope
@ REPL[6]:1
I’m not sure why there is now a method error, and what syntax to use instead.