JuliaLang / JuliaLang/PackageCompiler.jl
"Unable to find compatible target in system image" with julia 1.9-dev
- Dominant language
- Julia
- Stars
- 1.6k
- Forks
- 205
- Avg merge
- 18h 37m
- Merged PRs (30d)
- 7
Description
create_sysimage with no arguments works (though I get BUG_REPORT message)
```
create_sysimage(nothing; sysimage_path="valgrind-sysimg.so")
BUG_REPORT using Pkg; Pkg.precompile()
BUG_REPORT
⣠ [00m:40s] PackageCompiler: compiling incremental system image
```
However, if I call it with cpu_target="generic" (to use it with valgrind) it crashes
```
create_sysimage(nothing; sysimage_path="valgrind-sysimg.so", cpu_target="generic")
BUG_REPORT using Pkg; Pkg.precompile()
BUG_REPORT
⠋ [00m:00s] PackageCompiler: compiling incremental system imageERROR: Unable to find compatible target in system image.
✖ [00m:00s] PackageCompiler: compiling incremental system image
ERROR: failed process: Process(`/home/dani/dev/julia/julia/usr/bin/julia --color=yes --startup-file=no --cpu-target=generic -O3 --sysimage=/home/dani/dev/julia/julia/usr/lib/julia/sys.so --project=/home/dani/dev/julia/packagecompiler --output-o=/tmp/jl_TEraX2tclA.o /tmp/jl_bAfeLazYJs`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error
@ ./process.jl:562 [inlined]
[2] run(::Cmd; wait::Bool)
@ Base ./process.jl:477
[3] run
@ ./process.jl:475 [inlined]
[4] #14
@ ~/.julia/packages/PackageCompiler/wpsGv/ext/TerminalSpinners.jl:157 [inlined]
[5] spin(f::PackageCompiler.var"#14#15"{Cmd}, s::PackageCompiler.TerminalSpinners.Spinner{Base.TTY})
@ PackageCompiler.TerminalSpinners ~/.julia/packages/PackageCompiler/wpsGv/ext/TerminalSpinners.jl:164
[6] macro expansion
@ ~/.julia/packages/PackageCompiler/wpsGv/ext/TerminalSpinners.jl:157 [inlined]
[7] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String)
@ PackageCompiler ~/.julia/packages/PackageCompiler/wpsGv/src/PackageCompiler.jl:356
[8] create_sysimage(packages::Nothing; sysimage_path::String, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String)
@ PackageCompiler ~/.julia/packages/PackageCompiler/wpsGv/src/PackageCompiler.jl:507
[9] top-level
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with create_sysimage(nothing; cpu_target="generic") and compare it with the no-argument call. Start at src/PackageCompiler.jl around create_sysimg_object_file (line 356), then inspect the Julia command using --cpu-target=generic; done means identifying and fixing the incompatible system-image target while preserving the working default case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100