# Error when filtering stdlibs during app compilation

**URL:** https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930
**Category:** Tooling
**Tags:** question, package-compiler
**Created:** [October 29, 2024, 3:55pm UTC](https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930 "2024-10-29T15:55:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)
#### Post date: [October 29, 2024, 3:55pm UTC](https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930/1 "2024-10-29T15:55:32Z")

</div>

```julia
- 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:

```julia
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.

---

<div class="post-metadata">

### Author: ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)
#### Post date: [October 29, 2024, 4:06pm UTC](https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930/2 "2024-10-29T16:06:12Z")

</div>

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](https://github.com/JuliaLang/PackageCompiler.jl/issues/976)

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

---

<div class="post-metadata">

### Author: ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)
#### Post date: [October 29, 2024, 5:11pm UTC](https://discourse.julialang.org/t/error-when-filtering-stdlibs-during-app-compilation/121930/3 "2024-10-29T17:11:40Z")

</div>

Kristoffer has fixed [#976](https://github.com/JuliaLang/PackageCompiler.jl/issues/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.
