PackageCompiler.jl icon indicating copy to clipboard operation
PackageCompiler.jl copied to clipboard

"Unable to find compatible target in system image" with julia 1.9-dev

Open dpinol opened this issue 3 years ago • 3 comments

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 

dpinol avatar May 05 '22 14:05 dpinol

BUG_REPORT

I don't know where this comes from.

create_sysimage(nothing; sysimage_path="valgrind-sysimg.so", cpu_target="generic")

How did you install Julia? Did you download a nightly from the website or did you build it yourself? What CPU target did you use when building it?

KristofferC avatar May 05 '22 14:05 KristofferC

I use julia from git's master branch. I updated it again today and rebuilt and I didn't get the "BUG_REPORT" anymore. But I still get the "Unable to find compatible target in system image" crash. I built julia with plain "make", but I want a sysimg with cpu_target=generic to run valgrind (as per doc)

thanks

dpinol avatar May 05 '22 14:05 dpinol

You would need to build Julia with e.g. generic CPU target if you want to use a generic CPU target in PackageCompiler.

KristofferC avatar May 06 '22 15:05 KristofferC