Error when filtering stdlibs during app compilation

- PackageCompiler: creating compiler .ji image (incremental=false)
- PackageCompiler: compiling fresh sysimage (incremental=false)
error during bootstrap:
LoadError("/tmp/jl_srxx2I/sysimage_packagecompiler_c8bc2d1a-960b-11ef-01f2-673d840076c0.jl", 57, LoadError("/usr/local/julia/share/julia/stdlib/v1.11/Test/src/Test.jl", 3, LoadError("/usr/local/julia/share/julia/stdlib/v1.11/Test/src/precompile.jl", 1, MethodError(Base.RedirectStdStream(1, true), (Core.CoreSTDOUT(),), 0x0000000000008582))))

My configuration for PackageCompiler is:

PackageCompiler.create_app(
    "App",
    "compiled/App";
    cpu_target="generic",
    sysimage_build_args=`-O3`,
    include_transitive_dependencies=false,
    include_lazy_artifacts=true,
    incremental=false,
    filter_stdlibs=true,
)

I do not get the error when I keep the stdlibs.

This is an open issue. I’ve hit it too!

Regression in Julia 1.11: Cannot create fresh base sysimage (incremental=false) containing Pkg · Issue #976 · JuliaLang/PackageCompiler.jl

I actually get the same behavior in 1.10.4, but I haven’t narrowed it to an MWE yet.

Kristoffer has fixed #976 on PackageCompiler#master.

We are currently in the process of making a new release of PackageCompiler (which will be PackageCompiler v2.1.22) that will include the fix.

Edit: We have now released PackageCompiler v2.1.22.

2 Likes