allow building a "fat sysimage" with all the stdlibs in it - #60167
allow building a "fat sysimage" with all the stdlibs in it#60167KristofferC wants to merge 1 commit into
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.
Isn't this missing generate_precompile.jl?
Seems that it never runs on this code path
There was a problem hiding this comment.
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.
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.
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.
Do you know the reason for not running generate_precompile.jl directly in the "base" sysimage?
There was a problem hiding this comment.
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
|
[converting to draft just to prevent accidental merging while the PR has the "do not merge" label.] |
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