# PackageCompiler hangs while compiling nonincremental system image on Julia v1.11

**URL:** <https://discourse.julialang.org/t/packagecompiler-hangs-while-compiling-nonincremental-system-image-on-julia-v1-11/128099>\
**Category:** General Usage\
**Created:** [April 15, 2025, 2:31pm UTC](https://discourse.julialang.org/t/packagecompiler-hangs-while-compiling-nonincremental-system-image-on-julia-v1-11/128099 "2025-04-15T14:31:09Z")\
**Posts on this page:** 1\
**Showing post:** 44

<div class="post-metadata">

**Author:** ![uwestoehr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uwestoehr/32/216201_2.png) [@uwestoehr](https://discourse.julialang.org/u/uwestoehr)\
**Post date:** [April 22, 2025, 1:18am UTC](https://discourse.julialang.org/t/packagecompiler-hangs-while-compiling-nonincremental-system-image-on-julia-v1-11/128099/44 "2025-04-22T01:18:01Z")

</div>

> [@Benny](#):
>
> uwestoehr is saying single-threaded PackageCompiler takes longer (~40%) and often fails with errors on v1.11.4 compared to v1.10.9 for something.

Exactly. During the work on my solution, I announced [in this thread](https://discourse.julialang.org/t/step-by-step-instruction-and-example-how-to-create-standalone-applications-for-windows-with-a-g-ui/128274/1).  
I performed dozens of compilations. With Julia 1.11.4 there are threading issues. You get during PackageCompilation first warnings that a thread could not be ended and in contrast to Julia 1.10 the compilation sometimes fails. And as strange as it is, this is the case no matter if I set JULIA\_NUM\_THREADS to 1 or don’t have a JULIA\_NUM\_THREADS at all. Also, you can perform the same compilation 10 times in a row and several times the compilation fails but not always and not reproducibly. I really have no clue and this kind of randomness made me crazy.

To test, [I documented](https://codeberg.org/donovaly/Juliastic/src/branch/main/Readme.md) what I did in detail. I cannot do more as I have no clue how the JIT compiler works and how threading is done. After working on this many hours, I am however, sure that the issue is somewhere in the handling of threading.

Note that Julia 1.10 also gives you kind of random threading warnings, but first after the nonincremental system image was successfully compiled and they can be ignored as the compilation eventually succeeds every time.

---

_[View the full topic](https://discourse.julialang.org/t/packagecompiler-hangs-while-compiling-nonincremental-system-image-on-julia-v1-11/128099)._
