Skip to content

Fix hanging system image creation if multiple threads are set #1042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,15 @@ function create_sysimg_object_file(object_file::String,
write(outputo_file, julia_code)
# Read the input via stdin to avoid hitting the maximum command line limit

cmd = `$(get_julia_cmd()) --cpu-target=$cpu_target $sysimage_build_args
--sysimage=$base_sysimage --project=$project --output-o=$(object_file)
$outputo_file`
@debug "running $cmd"
# Make sure, that the final system image is built single-threaded and
# override any values set by "-t", "--threads" in `sysimage_build_args`
# or provided via JULIA_NUM_THREADS.
# This is needed until the underlying bug is fixed (see #963 and especially
# #990 containing a `git bisect` to the commit introducing the problem)
cmd = `$(get_julia_cmd()) --cpu-target=$cpu_target $sysimage_build_args
--sysimage=$base_sysimage --project=$project --output-o=$(object_file)
--threads=1 $outputo_file`
@debug "running $cmd"

non = incremental ? "" : "non"
spinner = TerminalSpinners.Spinner(msg = "PackageCompiler: compiling $(non)incremental system image")
Expand Down
Loading