ERROR: LoadError: could not load symbol "jl_tag_newly_inferred_enable"

I am bisecting the Julia repo for a bug, reproduced by a rather complex package that uses StaticArrays.jl. Around dbe19e49d9 (approximate, since I have been trying git bisect skip to get rid of this error, in vain) in the Julia repository, I am getting error messages like

julia> using StaticArrays
Info Given StaticArrays was explicitly requested, output will be shown live 
ERROR: LoadError: could not load symbol "jl_tag_newly_inferred_enable":     
/srv/home/tamas-numerical/julia/usr/bin/julia: undefined symbol: jl_tag_newly_inferred_enable
Stacktrace:                                                                                    
  [1] tag_newly_inferred_enable                                                                
    @ ~/.julia/packages/PrecompileTools/zOnGe/src/workloads.jl:16 [inlined]
  [2] macro expansion
    @ ~/.julia/packages/PrecompileTools/zOnGe/src/workloads.jl:71 [inlined]
  [3] macro expansion                    
    @ ~/.julia/packages/StaticArrays/LSPcF/src/precompile.jl:2 [inlined]
  [4] macro expansion                                                                                                                                                                          
    @ ~/.julia/packages/PrecompileTools/zOnGe/src/workloads.jl:113 [inlined]
  [5] top-level scope       
    @ ~/.julia/packages/StaticArrays/LSPcF/src/precompile.jl:112
  [6] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:304     
  [7] top-level scope   
    @ ~/.julia/packages/StaticArrays/LSPcF/src/StaticArrays.jl:145                          
  [8] include(mod::Module, _path::String)
    @ Base ./Base.jl:303
  [9] 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, UI
nt128}}, source::Nothing)               
    @ Base ./loading.jl:3002
 [10] top-level scope
    @ stdin:6             
 [11] eval(m::Module, e::Any)                                                                                                                                                                  
    @ Core ./boot.jl:486                                                                                                                                                                       
 [12] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2853
 [13] include_string
 [14] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:327                                                                                                                                                                     
 [15] _start()                                                                                 
    @ Base ./client.jl:557
in expression starting at /srv/home/tamas-numerical/.julia/packages/StaticArrays/LSPcF/src/precompile.jl:1                                                                                     
in expression starting at /srv/home/tamas-numerical/.julia/packages/StaticArrays/LSPcF/src/StaticArrays.jl:1
in expression starting at stdin:6                                                                                                                                                              
  ✗ StaticArrays                                                                                                                                                                               
Precompiling StaticArrays finished.                                                                                                                                                            
  0 dependencies successfully precompiled in 5 seconds. 7 already precompiled.                                                                                                                 
                                                                                               
ERROR: The following 1 direct dependency failed to precompile:                                                                                                                                 
                                                                                                                                                                                               
StaticArrays                                                                                   
                                                                                               
Failed to precompile StaticArrays [90137ffa-7385-5640-81b9-e52037218182] to "/srv/home/tamas-numerical/.julia/compiled/v1.12/StaticArrays/jl_aOJ3AW".                                          
ERROR: LoadError: could not load symbol "jl_tag_newly_inferred_enable":                  
/srv/home/tamas-numerical/julia/usr/bin/julia: undefined symbol: jl_tag_newly_inferred_enable
Stacktrace:                                                                                    
  [1] tag_newly_inferred_enable
    @ ~/.julia/packages/PrecompileTools/zOnGe/src/workloads.jl:16 [inlined]                    
  [2] macro expansion    
    @ ~/.julia/packages/PrecompileTools/zOnGe/src/workloads.jl:71 [inlined]
  [3] macro expansion                                                                                                                                                                          
    @ ~/.julia/packages/StaticArrays/LSPcF/src/precompile.jl:2 [inlined]                     
  [4] macro expansion                                                                          
    @ ~/.julia/packages/PrecompileTools/zOnGe/src/workloads.jl:113 [inlined]
  [5] top-level scope                                                                          
    @ ~/.julia/packages/StaticArrays/LSPcF/src/precompile.jl:112                               
  [6] include(mapexpr::Function, mod::Module, _path::String)                                   
    @ Base ./Base.jl:304                                                                       
  [7] top-level scope
    @ ~/.julia/packages/StaticArrays/LSPcF/src/StaticArrays.jl:145         
  [8] include(mod::Module, _path::String)
    @ Base ./Base.jl:303                                                                       
  [9] 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, UI
nt128}}, source::Nothing)                                                                      
    @ Base ./loading.jl:3002
 [10] top-level scope                                                                          
    @ stdin:6                                                                                  
 [11] eval(m::Module, e::Any)
    @ Core ./boot.jl:486
 [12] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2853             
 [13] include_string    
    @ ./loading.jl:2863 [inlined]                                                                                                                                                              
 [14] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:327  
 [15] _start()       
    @ Base ./client.jl:557
in expression starting at /srv/home/tamas-numerical/.julia/packages/StaticArrays/LSPcF/src/precompile.jl:1                                                                                     
in expression starting at /srv/home/tamas-numerical/.julia/packages/StaticArrays/LSPcF/src/StaticArrays.jl:1                                                                                   
in expression starting at stdin:                                          

The version I am using is [90137ffa] StaticArrays v1.9.13 which works before and after (ie at git bisect good and git bisect bad). Again, I am bisecting Julia, not this package, but this is the one I cannot load to test a particular commit.

1 Like

How to reproduce:

  1. check out the Julia repository at eg fea26ddecb8a6c404f0c501228bf17c9b384d686 and compile, start julia,
  2. then
    pkg> activate --temp
    pkg> add StaticArrays@1.9.13
    

gives the above error message.

I am also getting this error for all package installs.

1 Like

I could not find an open issue for this, is this known?

I’m also hitting this, but my bisect gives me a version bump commit as the first where StaticArrays fails to precompile. The missing symbol in question was added (and backported to 1.12) about a week ago

1 Like

OK, I think this is due to StaticArrays depending on PrecompileTools version 1.x.x, where version 1.3.0 declares compatibility with julia 1.12-nightly and looks for the new julia symbol. Not every commit with version 1.12-nightly contains the symbol, so PrecompileTools fails using julia between the two commits in my previous reply.

1 Like

I added the following to my bisect script to resolve this

Pkg.add("PrecompileTools", io=devnull)
Pkg.add("Preferences", io=devnull)

using PrecompileTools, Preferences
set_preferences!(PrecompileTools, "precompile_workloads" => false; force=true)

The error is due to PrecompileTools not being supported until Fix package precompilation (PrecompileTools) (#57828) · JuliaLang/julia@c89b1ff · GitHub on 1.12.

4 Likes

Thank you very much! With this I was able to complete the bisection.

2 Likes