# AOT compilation error on Julia 1.12 due to strip-metadata or filter\_stdlibs

**URL:** https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218
**Category:** General Usage
**Tags:** compilation
**Created:** [October 16, 2025, 9:41pm UTC](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218 "2025-10-16T21:41:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KSepetanc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ksepetanc/32/10841_2.png) [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)
#### Post date: [October 16, 2025, 9:41pm UTC](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218/1 "2025-10-16T21:41:22Z")

</div>

Normally I use `create_app` from PackageCompiler.jl and it completes successfully on Julia 1.11 with complex case (multiple dependencies). On 1.12 it fails so I decided to narrow down the example. Using PackageCompiler 2.2.3 and Julia 1.12-nightly (which is 1.12.1 basically at this point; but also 1.12.0 fails in the same way) the following command fails (both on Windows and Linux):

`create_sysimage(["JSON"]; sysimage_path="ExampleSysimage.so", sysimage_build_args=`–compile=all --strip-metadata --strip-ir`, filter_stdlibs=true, incremental=false)`

JSON here is v1.1.0. This is example case as I can find more packages that fail in the similar way (including older JSON releases, i.e. \<1). Command parameters here are more common for `create_app` since I want to recreate that behavior with simpler code. I thought it is worth reporting and discussing as it works in v1.11, but not in v1.12.

My internal testing shows that this case fails due to `strip-metadata` and more packages fail due to `filter_stdlibs` (such as PowerModels).

Here is write out of log:

> PS E:\test\>julia .\setup.jl  
> Activating project at `E:\test`  
> Updating registry at `C:\Users\karlo\.julia\registries\General.toml`  
> Updating `E:\test\Project.toml`  
> [682c06a0] + JSON v1.1.0  
> [9b87118b] + PackageCompiler v2.2.3  
> Updating `E:\test\Manifest.toml`  
> [c27321d9] + Glob v1.3.1  
> [682c06a0] + JSON v1.1.0  
> [9b87118b] + PackageCompiler v2.2.3  
> [69de0a69] + Parsers v2.8.3  
> [aea7be01] + PrecompileTools v1.3.3  
> [21216c6a] + Preferences v1.5.0  
> [05181044] + RelocatableFolders v1.0.1  
> [6c6a2e73] + Scratch v1.3.0  
> [ec057cc2] + StructUtils v2.5.1  
> [0dad84c5] + ArgTools v1.1.2  
> [56f22d72] + Artifacts v1.11.0  
> [2a0f44e3] + Base64 v1.11.0  
> [ade2ca70] + Dates v1.11.0  
> [f43a241f] + Downloads v1.6.0  
> [7b1f6079] + FileWatching v1.11.0  
> [ac6e5ff7] + JuliaSyntaxHighlighting v1.12.0  
> [4af54fe1] + LazyArtifacts v1.11.0  
> [b27032c2] + LibCURL v0.6.4  
> [76f85450] + LibGit2 v1.11.0  
> [8f399da3] + Libdl v1.11.0  
> [56ddb016] + Logging v1.11.0  
> [d6f4376e] + Markdown v1.11.0  
> [ca575930] + NetworkOptions v1.3.0  
> [44cfe95a] + Pkg v1.12.0  
> [de0858da] + Printf v1.11.0  
> [9a3f8284] + Random v1.11.0  
> [ea8e919c] + SHA v0.7.0  
> [f489334b] + StyledStrings v1.11.0  
> [fa267f1f] + TOML v1.0.3  
> [a4e569a6] + Tar v1.10.0  
> [cf7118a7] + UUIDs v1.11.0  
> [4ec0a83e] + Unicode v1.11.0  
> [deac9b47] + LibCURL\_jll v8.11.1+1  
> [e37daf67] + LibGit2\_jll v1.9.0+0  
> [29816b5a] + LibSSH2\_jll v1.11.3+1  
> [14a3606d] + MozillaCACerts\_jll v2025.5.20  
> [458c3c95] + OpenSSL\_jll v3.5.1+0  
> [83775a58] + Zlib\_jll v1.3.1+2  
> [8e850ede] + nghttp2\_jll v1.64.0+1  
> [3f19e933] + p7zip\_jll v17.5.0+2  
> ✔ [02m:57s] PackageCompiler: creating compiler sysimage (incremental=false)  
> ✔ [01m:03s] PackageCompiler: compiling fresh sysimage (incremental=false)  
> Precompiling Pkg finished.  
> 30 dependencies successfully precompiled in 12 seconds  
> ✗ StructUtils  
> ✗ JSON  
> Precompiling packages finished.  
> 8 dependencies successfully precompiled in 6 seconds. 30 already precompiled.
> 
> ERROR: The following 1 direct dependency failed to precompile:
> 
> JSON
> 
> Failed to precompile JSON [682c06a0-de6a-54ab-a142-c8b1cf79cde6] to “C:\Users\karlo\.julia\compiled\v1.12\JSON\jl\_1B4.tmp”.  
> ERROR: LoadError: UndefVarError: `##meta#60` not defined in `Base.Docs`  
> Stacktrace:  
> [1] meta(?::Module; ?::Bool)  
> @ Base.Docs .\docs\Docs.jl:84  
> [2] meta  
> @ .\docs\Docs.jl:77 [inlined]  
> [3] \_doc(?::Base.Docs.Binding, ?::Type)  
> @ Base.Docs .\docs\Docs.jl:578  
> [4] \_doc(?::Base.Docs.Binding)  
> @ Base.Docs .\docs\Docs.jl:572  
> [5] top-level scope  
> @ C:\Users\karlo.julia\packages\StructUtils\CvpPP\src\StructUtils.jl:151  
> [6] eval  
> @ .\none:-1 [inlined]  
> [7] include(?::Module, ?::String)  
> @ Base .\Base.jl:306  
> [8] include\_package\_for\_output(?::Base.PkgId, ?::String, ?::Vector{String}, ?::Vector{String}, ?::Vector{String}, ?::Vector{Pair{Base.PkgId, UInt128}}, ?::String)  
> @ Base .\loading.jl:2996  
> [9] top-level scope  
> @ C:\Users\karlo.julia\juliaup\julia-1.12-nightly\share\julia\Compiler\src\stdin:5  
> [10] eval  
> @ .\none:-1 [inlined]  
> [11] eval(?::Module, ?::Any)  
> @ Core .\<missing\>:0  
> [12] include\_string(?::typeof(identity), ?::Module, ?::String, ?::String)  
> @ Base .\loading.jl:2842  
> [13] include\_string  
> @ .\loading.jl:2852 [inlined]  
> [14] exec\_options(?::Base.JLOptions)  
> @ Base .\client.jl:315  
> [15] \_start()  
> @ Base .\client.jl:550  
> in expression starting at C:\Users\karlo.julia\packages\StructUtils\CvpPP\src\StructUtils.jl:1  
> in expression starting at stdin:5  
> ERROR: LoadError: Failed to precompile StructUtils [ec057cc2-7a8d-4b58-b3b3-92acb9f63b42] to “C:\Users\karlo\.julia\compiled\v1.12\StructUtils\jl\_249.tmp”.  
> Stacktrace:  
> [1] error  
> @ .\none:-1 [inlined]  
> [2] error(?::String)  
> @ Base .\<missing\>:0  
> [3] compilecache(?::Base.PkgId, ?::String, ?::IO, ?::IO, ?::Bool; ?::Cmd, ?::Base.CacheFlags, ?::Dict{String, Int64}, ?::Nothing)  
> @ Base .\loading.jl:3283  
> [4] compilecache (repeats 2 times)  
> @ .\none:-1 [inlined]  
> [5] (::Base.var"#\_\_require\_prelocked##0#\_\_require\_prelocked##1"{Base.PkgId, String, Dict{String, Int64}})()  
> @ Base .\loading.jl:2651  
> [6] maybe\_cachefile\_lock(?::Base.var"#\_\_require\_prelocked##0#\_\_require\_prelocked##1"{Base.PkgId, String, Dict{String, Int64}}, ?::Base.PkgId, ?::String; ?::Int64)  
> @ Base .\loading.jl:3870  
> [7] maybe\_cachefile\_lock  
> @ .\loading.jl:3851 [inlined]  
> [8] \_\_require\_prelocked(?::Base.PkgId, ?::String)  
> @ Base .\loading.jl:2637  
> [9] \_require\_prelocked(?::Base.PkgId, ?::String)  
> @ Base .\loading.jl:2465  
> [10] macro expansion  
> @ .\loading.jl:2393 [inlined]  
> [11] macro expansion  
> @ .\lock.jl:376 [inlined]  
> [12] \_\_require(?::Module, ?::Symbol)  
> @ Base .\loading.jl:2358  
> [13] require(?::Module, ?::Symbol)  
> @ Base .\loading.jl:2334  
> [14] top-level scope  
> @ C:\Users\karlo.julia\packages\JSON\jLnej\src\JSON.jl:6  
> [15] eval  
> @ .\none:-1 [inlined]  
> [16] include(?::Module, ?::String)  
> @ Base .\Base.jl:306  
> [17] include\_package\_for\_output(?::Base.PkgId, ?::String, ?::Vector{String}, ?::Vector{String}, ?::Vector{String}, ?::Vector{Pair{Base.PkgId, UInt128}}, ?::Nothing)  
> @ Base .\loading.jl:2996  
> [18] top-level scope  
> @ C:\Users\karlo.julia\juliaup\julia-1.12-nightly\share\julia\Compiler\src\stdin:5  
> [19] eval  
> @ .\none:-1 [inlined]  
> [20] eval(?::Module, ?::Any)  
> @ Core .\<missing\>:0  
> [21] include\_string(?::typeof(identity), ?::Module, ?::String, ?::String)  
> @ Base .\loading.jl:2842  
> [22] include\_string  
> @ .\loading.jl:2852 [inlined]  
> [23] exec\_options(?::Base.JLOptions)  
> @ Base .\client.jl:315  
> [24] \_start()  
> @ Base .\client.jl:550  
> in expression starting at C:\Users\karlo.julia\packages\JSON\jLnej\src\JSON.jl:1  
> in expression starting at stdin:  
> ERROR: LoadError: failed process: Process(setenv(`'C:\Users\karlo\.julia\juliaup\julia-1.12-nightly\bin\julia.exe' --color=yes --startup-file=no --pkgimages=no '--sysimage=C:\Users\karlo\AppData\Local\Temp\jl_OpreYy\sys.dll' -e 'using Pkg; Pkg.precompile()'`,[“WINDIR=C:\WINDOWS”, “PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA App\NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;E:\HSL;C:\Program Files\Git\cmd;C:\Program Files\Wolfram Research\WolframScript\;C:\Program Files\dotnet\;C:\Program Files\Process Lasso\;C:\Program Files\Tailscale\;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Users\karlo\AppData\Local\Microsoft\WindowsApps;;C:\Users\karlo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\karlo\AMPL;C:\Users\karlo\AMPL\solvers”, “USERDOMAIN\_ROAMINGPROFILE=KARLO”, “WSLENV=WT\_SESSION:WT\_PROFILE\_ID:”, “LOCALAPPDATA=C:\Users\karlo\AppData\Local”, “HOMEPATH=\Users\karlo”, “PROCESSOR\_IDENTIFIER=AMD64 Family 26 Model 68 Stepping 0, AuthenticAMD”, “SCOPF\_THREADS=12”, “NUMBER\_OF\_PROCESSORS=24”, “SCOPF\_LINEAR\_SOLVER=ma27” … “DRIVERDATA=C:\Windows\System32\Drivers\DriverData”, “PROCESSOR\_LEVEL=26”, “JULIA\_LOAD\_PATH=E:\test;@stdlib”, “SYSTEMDRIVE=C:”, “=C:=C:\Users\karlo\.julia\juliaup\julia-1.12-nightly\share\julia\base”, “PROGRAMW6432=C:\Program Files”, “TEMP=C:\Users\karlo\AppData\Local\Temp”, “HOMEDRIVE=C:”, “OPENBLAS\_MAIN\_FREE=1”, “PROCESSOR\_ARCHITECTURE=AMD64”]), ProcessExited(1)) [1]
> 
> Stacktrace:  
> [1] pipeline\_error  
> @ .\process.jl:598 [inlined]  
> [2] run(::Cmd; wait::Bool)  
> @ Base .\process.jl:513  
> [3] run  
> @ .\process.jl:510 [inlined]  
> [4] ensurecompiled(project::String, packages::Vector{String}, sysimage::String)  
> @ PackageCompiler C:\Users\karlo.julia\packages\PackageCompiler\FE8YQ\src\PackageCompiler.jl:309  
> [5] create\_sysimage(packages::Vector{String}; sysimage\_path::String, project::String, precompile\_execution\_file::Vector{String}, precompile\_statements\_file::Vector{String}, incremental::Bool, filter\_stdlibs::Bool, cpu\_target::String, script::Nothing, sysimage\_build\_args::Cmd, include\_transitive\_dependencies::Bool, base\_sysimage::Nothing, julia\_init\_c\_file::Nothing, julia\_init\_h\_file::Nothing, version::Nothing, soname::Nothing, compat\_level::String, extra\_precompiles::String, import\_into\_main::Bool)  
> @ PackageCompiler C:\Users\karlo.julia\packages\PackageCompiler\FE8YQ\src\PackageCompiler.jl:604  
> [6] top-level scope  
> @ E:\test\setup.jl:9  
> [7] include(mod::Module, \_path::String)  
> @ Base .\Base.jl:306  
> [8] exec\_options(opts::Base.JLOptions)  
> @ Base .\client.jl:317  
> [9] \_start()  
> @ Base .\client.jl:550  
> in expression starting at E:\test\setup.jl:9

---

<div class="post-metadata">

### Author: ![KSepetanc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ksepetanc/32/10841_2.png) [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)
#### Post date: [November 30, 2025, 10:52am UTC](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218/2 "2025-11-30T10:52:36Z")

</div>

Bump.

Could admin please also set PackageCompiler tag?

---

<div class="post-metadata">

### Author: ![guilhermebodin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/guilhermebodin/32/6982_2.png) [@guilhermebodin](https://discourse.julialang.org/u/guilhermebodin)
#### Post date: [March 19, 2026, 4:58pm UTC](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218/3 "2026-03-19T16:58:00Z")

</div>

Had the same problem and opened an issue in a bunch of repos [Problems with Base.Docs and PackageCompiler · Issue #61351 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/61351)  
[Create\_app not working for 1.12 in combination with `@doc` macro · Issue #1082 · JuliaLang/PackageCompiler.jl · GitHub](https://github.com/JuliaLang/PackageCompiler.jl/issues/1082)

---

<div class="post-metadata">

### Author: ![KSepetanc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ksepetanc/32/10841_2.png) [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)
#### Post date: [March 23, 2026, 7:08pm UTC](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218/4 "2026-03-23T19:08:14Z")

</div>

Thanks for reporting this error too. I can confirm that the issue persists in Julia 1.13 beta 3. Maybe it needs to be reported and solved on the Github of the Julia itself.
