-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
allow building a "fat sysimage" with all the stdlibs in it #60167
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
base: master
Are you sure you want to change the base?
Conversation
| JULIA_DEPOT_PATH=$$(call cygpath_w,$$(build_prefix)/share/julia) \ | ||
| JULIA_NUM_THREADS=1 \ | ||
| $$(call spawn, $4) $3 -C "$$(JULIA_CPU_TARGET)" $$(HEAPLIM) --output-o $$(call cygpath_w,$$@).tmp $$(JULIA_SYSIMG_BUILD_FLAGS) \ | ||
| --startup-file=no --warn-overwrite=yes --depwarn=error --sysimage $$(call cygpath_w,$$<) sysimg_stdlibs.jl; then \ |
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.
Isn't this missing generate_precompile.jl?
Seems that it never runs on this code path
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.
That's already run on the base image, and we build on top of that so why would we want to run that again?
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.
Isn't this using build_sysbase_$1, which is not the final base sysimage? I thought that would be $$(build_private_libdir)/sys$1.$(SHLIB_EXT)
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.
Oh, hm, I actually wasn't aware there were two such sysimages being created. So yes, I think you are right.
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.
Do you know the reason for not running generate_precompile.jl directly in the "base" sysimage?
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.
This is a bit finicky, e.g.
Stdlibs total ──────────────── 5.223498 seconds
Collecting and executing precompile statements
└ Collect (Basic: Assertion failed: ((stream->type == UV_TCP || stream->type == UV_NAMED_PIPE || stream->type == UV_TTY) && "uv_write (unix) does not yet support other types of streams"), function uv__check_before_write, file src/unix/stream.c, line 1297.
[4079] signal 6: Abort trap: 6
in expression starting at /Users/kc/julia/contrib/generate_precompile.jl:10
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 5369068 (Pool: 5368927; Big: 141); GC: 8
/bin/sh: line 1: 4079 Abort trap: 6
This is an alternative to #60139 where instead of trying to put the stdlibs into the first sysimage (which requires running their top-level code in the output-o process which doesn't run inits), we do like PackageCompiler and build a new sysimage on top of the "base" one where we can load already precompiled stdlibs. This allows us to put e.g. REPL into the sysimage which does not work the "normal" method.
The makefile stuff is completely AI generated.
cc @pankgeorg