Constant i64 error on macOS and Julia 1.12
Hello all,
I try to build a relative small sys image for a package I have. I get the following error
PackageCompiler: compiling incremental system imageLLVM ERROR: Cannot select: 0x6c88f9150: i64 = vscale Constant:i64<1>
⣄ PackageCompiler: compiling incremental system imageLLVM ERROR: Cannot select: 0x6c88f9150: i= vscale Constant:i64<1>, /Users/Robin/.julia/packages/HostCPUFeatures/bFJZ
j/src/cpu_info_aarch64.jl:5 0x6c88e5620: i64 = Constant<1>
In function: julia_vscale_367595
[84403] signal 6: Abort trap: 6
in expression starting at none:0
Allocations: 1129365828 (Pool: 1129359960; Big: 5868); GC: 78
✖ [10m:30s] PackageCompiler: compiling incremental system image
┌ Warning: Free system memory dropped to 57.281 MiB during sysimage compilation.
│ If the reason the subprocess errored isn't clear, it may have been OOM-killed.
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/FE8YQ/src/PackageCompiler.jl:133
ERROR: failed process: Process(`/Users/Robin/.julia/juliaup/julia-1.12.1+0.aarch64.apple.darwin14/bin/julia --color=yes --startup-file=no --pkgimages=no --cpu-target=native --sysimag
e=/Users/Robin/.julia/juliaup/julia-1.12.1+0.aarch64.apple.darwin14/lib/julia/sys.dylib --project=/Users/Robin/Documents/Travail/IRISA/Outils/Julia/Tempest/TempestSDR --output-o=/var
/folders/8g/jg9twp5s1b56hlnqhfwf21sc0000gq/T/jl_SjIrSDQ7Wb-o.a --threads=1 /var/folders/8g/jg9twp5s1b56hlnqhfwf21sc0000gq/T/jl_8tgnMPcr8J`, ProcessSignaled(6)) [0]
I am on Julia 1.12 and MacOS
julia> versioninfo()
Julia Version 1.12.1
Commit ba1e628ee49 (2025-10-17 13:02 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: macOS (arm64-apple-darwin24.0.0)
CPU: 8 × Apple M1
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, apple-m1)
GC: Built with stock GC
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
If you need anything else, please feel free to ask and many thanks for the wonderfull package.
I have been experiencing similar issues after upgrading to Julia 1.12. We had a working setup still with Julia 1.9, but I have been trying to update to Julia 1.12.
┌ Warning: Free system memory dropped to 57.281 MiB during sysimage compilation. line matches my error.
Before starting the command create_sysimage, the command Sys.free_memory() still reports 16GB free memory.
Somehow creating system image eats all of my 16GB of memory and causes it to crash prematurely in Julia 1.12?
cpu_target="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"
I was also able to notice that when I was running create_sysimage in one Julia process and I started another Julia process to debug free system memory, I would receive slowly memory draining after repeated commands. I suppose large memory usage is expected, but seems unusual amount.
julia> Base.format_bytes(Sys.free_memory())
"12.743 GiB"
julia> Base.format_bytes(Sys.free_memory())
"6.696 GiB"
julia> Base.format_bytes(Sys.free_memory())
"5.412 GiB"
julia> Base.format_bytes(Sys.free_memory())
"5.257 GiB"
julia> Base.format_bytes(Sys.free_memory())
"4.753 GiB"
julia> Base.format_bytes(Sys.free_memory())
"3.691 GiB"