-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
When attempting to use PackageCompiler inside a linux/arm64/v8 Docker image if you specify the cpu_target keyword you get a segmentation fault:
root@13bca6165856:/# julia -e 'using PackageCompiler; create_sysimage(replace_default=true, cpu_target="armv8-a")'
[ Info: PackageCompiler: creating system image object file, this might take a while...
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
ERROR: failed process: Process(`/usr/local/julia/bin/julia --color=yes --startup-file=no --cpu-target=armv8-a --sysimage=/usr/local/julia/lib/julia/sys.so --project=/root/.julia/environments/v1.5 --output-o=/tmp/jl_9QgKjD.o -e 'Base.reinit_stdio()
@eval Sys BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String
Base.init_load_path()
Base.init_depot_path()
# This @eval prevents symbols from being put into Main
@eval Module() begin
PrecompileStagingArea = Module()
for (_pkgid, _mod) in Base.loaded_modules
if !(_pkgid.name in ("Main", "Core", "Base"))
eval(PrecompileStagingArea, :(const $(Symbol(_mod)) = $_mod))
end
end
precompile_statements = String[]
append!(precompile_statements, readlines("/tmp/jl_hoGagH"))
for statement in sort(precompile_statements)
# println(statement)
try
Base.include_string(PrecompileStagingArea, statement)
catch
# See julia issue #28808
@debug "failed to execute $statement"
end
end
end # module
empty!(LOAD_PATH)
empty!(DEPOT_PATH)
'`, ProcessSignaled(11)) [0]
Stacktrace:
[1] pipeline_error at ./process.jl:525 [inlined]
[2] run(::Cmd; wait::Bool) at ./process.jl:440
[3] run at ./process.jl:438 [inlined]
[4] create_sysimg_object_file(::String, ::Array{String,1}; project::String, base_sysimage::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, cpu_target::String, script::Nothing, isapp::Bool) at /root/.julia/packages/PackageCompiler/vsMJE/src/PackageCompiler.jl:292
[5] create_sysimage(::Array{Symbol,1}; sysimage_path::Nothing, project::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, incremental::Bool, filter_stdlibs::Bool, replace_default::Bool, cpu_target::String, script::Nothing, base_sysimage::Nothing, isapp::Bool) at /root/.julia/packages/PackageCompiler/vsMJE/src/PackageCompiler.jl:423
[6] top-level scope at none:1
Can be reproduced with:
# Run linux/arm64/v8 Docker image
docker run -it --rm julia:1.5@sha256:c9d751ccba25d1407376e03400c697e03e6f4f40b13e693f43105c6b94153625 bash
apt update
apt install -y gcc
gcc -dumpmachine # aarch64-linux-gnu
julia -e 'using Pkg; Pkg.add(PackageSpec(name="PackageCompiler", version="1"))'
julia -e 'using PackageCompiler; create_sysimage(replace_default=true, cpu_target="armv8-a")'Metadata
Metadata
Assignees
Labels
No labels