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
Fix JULIA_CPU_TARGET
being propagated to workers precompiling stdlib pkgimages
#54093
base: master
Are you sure you want to change the base?
Conversation
Is there any way we can make sure that this errors if we fail to propagate this again in the future? |
pkgimage.mk
Outdated
@@ -25,8 +25,7 @@ print-depot-path: | |||
@$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e '@show Base.DEPOT_PATH') | |||
|
|||
$(BUILDDIR)/stdlib/%.image: $(JULIAHOME)/stdlib/Project.toml $(JULIAHOME)/stdlib/Manifest.toml $(INDEPENDENT_STDLIBS_SRCS) $(JULIA_DEPOT_PATH)/compiled | |||
export JULIA_CPU_TARGET="$(JULIA_CPU_TARGET)" | |||
@$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.Precompilation.precompilepkgs(;configs=[``=>Base.CacheFlags(), `--check-bounds=yes`=>Base.CacheFlags(;check_bounds=1)])') | |||
@$(call PRINT_JULIA, JULIA_CPU_TARGET="$(JULIA_CPU_TARGET)" $(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.Precompilation.precompilepkgs(;configs=[``=>Base.CacheFlags(), `--check-bounds=yes`=>Base.CacheFlags(;check_bounds=1)])') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@topolarity given the proximity it seems unnecessary. Otherwise I don't think it's valid to check inside precompilepkgs
@$(call PRINT_JULIA, JULIA_CPU_TARGET="$(JULIA_CPU_TARGET)" $(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.Precompilation.precompilepkgs(;configs=[``=>Base.CacheFlags(), `--check-bounds=yes`=>Base.CacheFlags(;check_bounds=1)])') | |
@$(call PRINT_JULIA, JULIA_CPU_TARGET="$(JULIA_CPU_TARGET)" $(call spawn,$(JULIA_EXECUTABLE)) --startup-file=no -e 'haskey(ENV, "JULIA_CPU_TARGET") || error(); Base.Precompilation.precompilepkgs(;configs=[``=>Base.CacheFlags(), `--check-bounds=yes`=>Base.CacheFlags(;check_bounds=1)])') |
I think the canonical way is something like f106bd9 |
Question, why not set the env variable "globally" together with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we merge this? I'm happy with it, as long as it fixes the issue for now
I'm ok with this but if someone has a better or more canonical way feel free to push to this branch. #54093 (comment) seems easiest to me IIUC though? |
With a build from this PR I get
which seems to suggest |
…b pkgimages Apparently (thanks ChatGPT) each line in a make file is executed in a separate shell so adding an `export` line on one line does not propagate to the next line.
d0a612f
to
0bc1842
Compare
The command to compile the pkgimage seems to include the CPU target properly:
but yet
|
is |
|
Apparently (thanks ChatGPT) each line in a makefile is executed in a separate shell so adding an
export
line on one line does not propagate to the next line.