When I used PackageCompiler.create_sysimage in Linux OS, an error occurred. Then I tried the same work in another server with Linux OS and the same error appeared. But when I first used the package in my Windows10 computer, there was no error.
I also opened a issue at GitHub, but nobody has answered until now.
julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
julia> using PackageCompiler
julia> create_sysimage(:JuMP, sysimage_path="/home/yy/sys_test.so", precompile_execution_file="/home/yy/test.jl")
[ Info: PackageCompiler: creating system image object file, this might take a while...
ERROR: failed process: Process(`/home/yy/julia-1.4.2/bin/julia --color=yes --startup-file=no --cpu-target=native --sysimage=/home/yy/julia-1.4.2/lib/julia/sys.so --project=/home/yy/.julia/environments/v1.4 --output-o=/tmp/jl_iO8qhD.o -e 'Base.reinit_stdio()
@eval Sys BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String
Base.init_load_path()
Base.init_depot_path()
using JuMP
# 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_nVx9jH"))
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(9)) [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 /home/yy/.julia/packages/PackageCompiler/xtztx/src/PackageCompiler.jl:292
[5] create_sysimage(::Symbol; sysimage_path::String, project::String, precompile_execution_file::String, 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 /home/yy/.julia/packages/PackageCompiler/xtztx/src/PackageCompiler.jl:423
[6] top-level scope at REPL[2]:1