Package compiler fails when using Julia 1.7

I have a package and a script that creates a new system image. It works fine with Julia 1.6.4, but fails with Julia 1.7. I tried both on Ubuntu 18.04 and 20.04. Strange error messages:

ā ™ [04m:36s] PackageCompiler: compiling incremental system imageisLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
...
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
isLoadFromConstGV at /buildworker/worker/package_linux64/build/src/llvm-late-gc-lowering.cpp:1153
āœ– [04m:37s] PackageCompiler: compiling incremental system image
ERROR: LoadError: failed process: Process(`/home/ufechner/packages/julias/julia-1.7/bin/julia --color=yes --startup-file=no --cpu-target=native -O3 --sysimage=/home/ufechner/packages/julias/julia-1.7/lib/julia/sys.so --project=/home/ufechner/repos/trader --output-o=/tmp/jl_aStPSw.o /tmp/jl_UfsIhn`, ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:531 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:446
  [3] run
    @ ./process.jl:444 [inlined]
  [4] #14
    @ ~/.julia/packages/PackageCompiler/R3n2H/ext/TerminalSpinners.jl:157 [inlined]
  [5] spin(f::PackageCompiler.var"#14#15"{Cmd}, s::PackageCompiler.TerminalSpinners.Spinner{Base.TTY})
    @ PackageCompiler.TerminalSpinners ~/.julia/packages/PackageCompiler/R3n2H/ext/TerminalSpinners.jl:164
  [6] macro expansion
    @ ~/.julia/packages/PackageCompiler/R3n2H/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)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/R3n2H/src/PackageCompiler.jl:352
  [8] create_sysimage(packages::Vector{Symbol}; sysimage_path::String, project::String, precompile_execution_file::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)
    @ PackageCompiler ~/.julia/packages/PackageCompiler/R3n2H/src/PackageCompiler.jl:502
  [9] top-level scope
    @ ~/repos/trader/test/create_sys_image.jl:10
 [10] include(fname::String)
    @ Base.MainInclude ./client.jl:451
 [11] top-level scope
    @ none:1
in expression starting at /home/ufechner/repos/trader/test/create_sys_image.jl:10

My packages:

(trader) pkg> st
      Status `~/repos/trader/Project.toml`
  [6e4b80f9] BenchmarkTools v1.2.0
  [336ed68f] CSV v0.9.11
  [8f4d0f93] Conda v1.6.0
  [a93c6f00] DataFrames v1.2.2
  [8fd68953] FeatureTransforms v0.3.10
  [587475ba] Flux v0.12.8
  [53d20848] FluxArchitectures v0.1.3
  [38e38edf] GLM v1.5.1
  [cd3eb016] HTTP v0.9.17
  [f7bf1975] Impute v0.6.7
  [033835bb] JLD2 v0.4.15
  [682c06a0] JSON v0.21.2
  [0f8b85d8] JSON3 v1.9.2
  [9b87118b] PackageCompiler v2.0.2
  [d96e819e] Parameters v0.12.3
  [91a5bcdd] Plots v1.24.3
  [438e738f] PyCall v1.92.5
  [d330b81b] PyPlot v2.10.0
  [f269a46b] TimeZones v1.6.2
  [de0858da] Printf
  [10745b16] Statistics
  [8dfed614] Test

Any idea?

1 Like

I created an issue: https://github.com/JuliaLang/PackageCompiler.jl/issues/643

The problem is Flux v0.12.8 on julia v1.7 .

2 Likes