From 904650f8051b3f51034342b499864bcf84ae8bef Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 31 Oct 2024 19:04:36 -0400 Subject: [PATCH 1/2] Pass "" as the BUILDROOT for Julia 1.12+ --- src/PackageCompiler.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PackageCompiler.jl b/src/PackageCompiler.jl index 07d7395f..43a68b36 100644 --- a/src/PackageCompiler.jl +++ b/src/PackageCompiler.jl @@ -260,10 +260,15 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String, new_sysimage_source_path = joinpath(tmp, "sysimage_packagecompiler_$(uuid1()).jl") write(new_sysimage_source_path, new_sysimage_content) try + # The final positional argument of "" is to pass BUILDROOT="" to Base.jl. + # In Julia 1.11 and earlier, this positional argument will be ignored. + # In Julia 1.12 and later, this positional argument will be picked up by Base.jl, + # and Base.jl will set Base.BUILDROOT to "". + # https://github.com/JuliaLang/PackageCompiler.jl/issues/989 cmd = addenv(`$(get_julia_cmd()) --cpu-target $cpu_target --sysimage=$tmp_corecompiler_ji $sysimage_build_args --output-o=$tmp_sys_o - $new_sysimage_source_path`, + $new_sysimage_source_path ""`, "JULIA_LOAD_PATH" => "@stdlib") @debug "running $cmd" From 6e15a4e58864700923d6b0f4c426102d65ecc271 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 31 Oct 2024 19:40:05 -0400 Subject: [PATCH 2/2] Bump version number from 2.1.22 to 2.1.23 (because this PR is a bugfix) --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d7f08826..9963d665 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "PackageCompiler" uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -version = "2.1.22" +version = "2.1.23" [deps] Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"