Skip to content

Agents.jl does not precompile with Julia 1.12.0 (Linux) #1182

@markusgumbel

Description

@markusgumbel

I have created an empty Julia project called agents112 and have added the Agents.jl package (version 6.2.10). The precompilation process with Julia 1.12.0 always ends with errors.

Here's the console log:

(agents112) pkg> add Agents
   Resolving package versions...
    Updating `~/Local-Docs/src/Julia/agents112/Project.toml`
  [46ada45e] + Agents v6.2.10
    Updating `~/Local-Docs/src/Julia/agents112/Manifest.toml`
...
       Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
  ✗ JLD2
  ✗ StaticGraphs
  ✗ MetaGraphs
  ✗ LightOSM
  ✗ Agents
Precompiling packages finished.
  0 dependencies successfully precompiled in 74 seconds. 156 already precompiled.
  5 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

The full error stack is

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

Agents 

Failed to precompile Agents [46ada45e-f475-11e8-01d0-f70cc89e6671] to "/home/markus/.julia/compiled/v1.12/Agents/jl_YUTZy9".
Error encountered while load FileIO.File{FileIO.DataFormat{:JLD2}, String}("/tmp/jl_HGLl4b").

Fatal error:
ERROR: LoadError: ConcurrencyViolationError("deadlock detected in loading JLD2 using JLD2")
Stacktrace:
  [1] canstart_loading(modkey::Base.PkgId, build_id::UInt128, stalecheck::Bool)
    @ Base ./loading.jl:2182
  [2] start_loading(modkey::Base.PkgId, build_id::UInt128, stalecheck::Bool)
    @ Base ./loading.jl:2190
  [3] _require_prelocked(uuidkey::Base.PkgId, env::Nothing)
    @ Base ./loading.jl:2460
  [4] _require_prelocked
    @ ./loading.jl:2459 [inlined]
  [5] macro expansion
    @ ./lock.jl:376 [inlined]
  [6] __require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:2457
  [7] require
    @ ./loading.jl:2455 [inlined]
  [8] #37
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:203 [inlined]
  [9] lock(f::FileIO.var"#37#38"{Base.PkgId}, l::ReentrantLock)
    @ Base ./lock.jl:335
 [10] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::@Kwargs{})
    @ FileIO ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:203
 [11] action
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:196 [inlined]
 [12] action
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:185 [inlined]
 [13] load(::String; options::@Kwargs{})
    @ FileIO ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:113
 [14] load
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:109 [inlined]
 [15] #111
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:26 [inlined]
 [16] mktemp(fn::JLD2.var"#111#112"{Symbol, Vector{Float64}, NTuple{5, Int64}, String, Dict{String, Int64}, Matrix{ComplexF64}, Vector{Float64}, Float64, Int64}, parent::String)
    @ Base.Filesystem ./file.jl:870
 [17] mktemp(fn::Function)
    @ Base.Filesystem ./file.jl:868
 [18] macro expansion
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:15 [inlined]
 [19] macro expansion
    @ ~/.julia/packages/PrecompileTools/gn08A/src/workloads.jl:73 [inlined]
 [20] macro expansion
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:14 [inlined]
 [21] macro expansion
    @ ~/.julia/packages/PrecompileTools/gn08A/src/workloads.jl:121 [inlined]
 [22] top-level scope
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:118
Stacktrace:
  [1] handle_error(e::ConcurrencyViolationError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})
    @ FileIO ~/.julia/packages/FileIO/EI2b8/src/error_handling.jl:75
  [2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector}}, action::String)
    @ FileIO ~/.julia/packages/FileIO/EI2b8/src/error_handling.jl:66
  [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::@Kwargs{})
    @ FileIO ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:228
  [4] action
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:196 [inlined]
  [5] action
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:185 [inlined]
  [6] load(::String; options::@Kwargs{})
    @ FileIO ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:113
  [7] load
    @ ~/.julia/packages/FileIO/EI2b8/src/loadsave.jl:109 [inlined]
  [8] #111
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:26 [inlined]
  [9] mktemp(fn::JLD2.var"#111#112"{Symbol, Vector{Float64}, NTuple{5, Int64}, String, Dict{String, Int64}, Matrix{ComplexF64}, Vector{Float64}, Float64, Int64}, parent::String)
    @ Base.Filesystem ./file.jl:870
 [10] mktemp(fn::Function)
    @ Base.Filesystem ./file.jl:868
 [11] macro expansion
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:15 [inlined]
 [12] macro expansion
    @ ~/.julia/packages/PrecompileTools/gn08A/src/workloads.jl:73 [inlined]
 [13] macro expansion
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:14 [inlined]
 [14] macro expansion
    @ ~/.julia/packages/PrecompileTools/gn08A/src/workloads.jl:121 [inlined]
 [15] top-level scope
    @ ~/.julia/packages/JLD2/wLPAN/src/precompile.jl:118
 [16] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [17] IncludeInto
    @ ./Base.jl:308 [inlined]
 [18] top-level scope
    @ ~/.julia/packages/JLD2/wLPAN/src/JLD2.jl:518
 [19] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [20] 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:2997
 [21] top-level scope
    @ stdin:5
 [22] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [23] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2843
 [24] include_string
    @ ./loading.jl:2853 [inlined]
 [25] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [26] _start()
    @ Base ./client.jl:550
in expression starting at /home/markus/.julia/packages/JLD2/wLPAN/src/precompile.jl:3
in expression starting at /home/markus/.julia/packages/JLD2/wLPAN/src/JLD2.jl:1
in expression starting at stdin:5
ERROR: LoadError: Failed to precompile JLD2 [033835bb-8acc-5ee8-8aae-3f567f8a3819] to "/home/markus/.julia/compiled/v1.12/JLD2/jl_l27p8U".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [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:3284
  [3] (::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}})()
    @ Base ./loading.jl:2652
  [4] mkpidlock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#7
    @ ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:114
  [7] #invokelatest_gr#232
    @ ./reflection.jl:1282 [inlined]
  [8] invokelatest_gr
    @ ./reflection.jl:1274 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3855
 [10] maybe_cachefile_lock
    @ ./loading.jl:3852 [inlined]
 [11] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2638
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2465
 [13] macro expansion
    @ ./loading.jl:2393 [inlined]
 [14] macro expansion
    @ ./lock.jl:376 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2358
 [16] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2334
 [17] top-level scope
    @ ~/.julia/packages/StaticGraphs/463Ar/src/StaticGraphs.jl:4
 [18] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [19] 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:2997
 [20] top-level scope
    @ stdin:5
 [21] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [22] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2843
 [23] include_string
    @ ./loading.jl:2853 [inlined]
 [24] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [25] _start()
    @ Base ./client.jl:550
in expression starting at /home/markus/.julia/packages/StaticGraphs/463Ar/src/StaticGraphs.jl:1
in expression starting at stdin:5
ERROR: LoadError: Failed to precompile StaticGraphs [4c8beaf5-199b-59a0-a7f2-21d17de635b6] to "/home/markus/.julia/compiled/v1.12/StaticGraphs/jl_AXSMUx".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [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:3284
  [3] (::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}})()
    @ Base ./loading.jl:2652
  [4] mkpidlock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#7
    @ ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:114
  [7] #invokelatest_gr#232
    @ ./reflection.jl:1282 [inlined]
  [8] invokelatest_gr
    @ ./reflection.jl:1274 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3855
 [10] maybe_cachefile_lock
    @ ./loading.jl:3852 [inlined]
 [11] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2638
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2465
 [13] macro expansion
    @ ./loading.jl:2393 [inlined]
 [14] macro expansion
    @ ./lock.jl:376 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2358
 [16] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2334
 [17] top-level scope
    @ ~/.julia/packages/LightOSM/qfooJ/src/LightOSM.jl:9
 [18] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [19] 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:2997
 [20] top-level scope
    @ stdin:5
 [21] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [22] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2843
 [23] include_string
    @ ./loading.jl:2853 [inlined]
 [24] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [25] _start()
    @ Base ./client.jl:550
in expression starting at /home/markus/.julia/packages/LightOSM/qfooJ/src/LightOSM.jl:1
in expression starting at stdin:5
ERROR: LoadError: Failed to precompile LightOSM [d1922b25-af4e-4ba3-84af-fe9bea896051] to "/home/markus/.julia/compiled/v1.12/LightOSM/jl_CHaVlU".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [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:3284
  [3] (::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}})()
    @ Base ./loading.jl:2652
  [4] mkpidlock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#7
    @ ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.12.0+0.x64.linux.gnu/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:114
  [7] #invokelatest_gr#232
    @ ./reflection.jl:1282 [inlined]
  [8] invokelatest_gr
    @ ./reflection.jl:1274 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3855
 [10] maybe_cachefile_lock
    @ ./loading.jl:3852 [inlined]
 [11] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2638
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2465
 [13] macro expansion
    @ ./loading.jl:2393 [inlined]
 [14] macro expansion
    @ ./lock.jl:376 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2358
 [16] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2334
 [17] top-level scope
    @ ~/.julia/packages/Agents/WuWeG/src/spaces/openstreetmap.jl:10
 [18] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [19] top-level scope
    @ ~/.julia/packages/Agents/WuWeG/src/Agents.jl:45
 [20] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [21] 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:2997
 [22] top-level scope
    @ stdin:5
 [23] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [24] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2843
 [25] include_string
    @ ./loading.jl:2853 [inlined]
 [26] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [27] _start()
    @ Base ./client.jl:550
in expression starting at /home/markus/.julia/packages/Agents/WuWeG/src/spaces/openstreetmap.jl:3
in expression starting at /home/markus/.julia/packages/Agents/WuWeG/src/Agents.jl:1
in expression starting at stdin:

Julia version:

julia> versioninfo()
Julia Version 1.12.0
Commit b907bd0600f (2025-10-07 15:42 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 14 × Intel(R) Core(TM) Ultra 7 165U
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
  GC: Built with stock GC
Threads: 8 default, 1 interactive, 8 GC (on 14 virtual cores)
Environment:
  JULIA_HOME = /home/markus/.juliaup
  JULIA_EDITOR = code
  JULIA_VSCODE_REPL = 1
  JULIA_NUM_THREADS = 8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions