I built a system image on Windows 10 using Julia 1.12. But I cannot start Julia with this system image:
C:\Users\ufechner\repos\IM_AWES_bench.jl\bin>julia -J sysimage.dll
ERROR: could not load library "C:\Users\ufechner\repos\IM_AWES_bench.jl\bin\sysimage.dll"
%1 is not a valid Win32 application.
julia> versioninfo()
Julia Version 1.12.6
Commit 15346901f0 (2026-04-09 19:20 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × AMD Ryzen 9 7950X 16-Core Processor
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)
Any idea?
Works fine on Linux.
And yes, Windows and Julia are both 64 bit. So the error message is a bit confusing.
If this is your main lead, then we need to create a Windows debugging environment. There are two paths, one is to use MSYS2 and use a GCC-based framework to analyze dynamic library loading.
There are also tools like WinDbg:
Essentially, we need to do the eqiuvalent of LD_DEBUG=libs. You’ll need to use gflags.exe that should come with WinDbg to enable logging of shared library loading on the Julia executable.
PackageCompiler.jl does require a C compiler, and I’m not sure which one you are using.
How shall I know that? I think PackageCompiler installs its own compiler as an artifact. One of the machines where I tried compiling it is quite virgin, not much on it, definitely no C compiler that I installed myself. I just installed Git for Windows, which comes with a Bash shell.
This looks a bit as if there might be an upper limit of 2 GB on the size of the sysimage on Windows. If that should be the case, PackageCompiler should at least print a warning.