Skip to content

Conversation

gbaraldi
Copy link
Member

Build a no-GPL julia on 1.11 with compression.
Mostly because building julia on windows is annoying

topolarity and others added 7 commits August 20, 2025 07:54
Inspired by a bug I hit on MinGW recently with weak symbol resolution.
I'm not sure why we started using these in
70000ac, since I believe we should be
able to lookup these symbols just fine in our `jl_exe_handle` as long as
it was linked / compiled with `-rdynamic`

Migrating away from weak symbols seems a good idea, given their uneven
implementation across platforms.

(cherry picked from commit 4a6ada6)
Introduce `jl_image_buf_t` to represent the in-memory details of an
unparsed system image and clean-up several global variables and split
loading logic in staticdata.c so that we get (almost) everything we need
from the sysimage handle at once.

This allows sysimage loading to be separated into three phases:
  1. Lookup the raw sysimage buffer as a `jl_image_buf_t`
2. For .so sysimages, parse the sysimage and initialize JIT targets,
etc.
  3. Finally load the sysimage into a `jl_image_t`

Care was taken to preserve the existing behavior of calling
`jl_set_sysimg_so` to configure the sysimage before initializing Julia,
although this is likely to be next on the chopping block in a follow-up.

Dependent on #57523.
Co-authored-by: Gabriel Baraldi <[email protected]>

madvise with MADV_WILLNEED before accessing sysimage pages

MADV_WILLNEED sysimage pages before checksumming or decompressing

Even without compression, this gives about an 8% improvement in load times.

Fix using jl_page_size before it is initialized

Add zstd to ANALYSIS_DEPS now that it is used in staticdata.c

Fix jl_page_size being uninitialized in jl_prefetch_system_image

Add --compress-sysimage flag; use zstd-15 when enabled
@gbaraldi gbaraldi added the DO NOT MERGE Do not merge this PR! label Sep 30, 2025
)

Currently we support removing GPL dependencies in the full source build.
This will also remove the GPL dependencies from the binary-dist target
when built with JLLs.

I almost feel like it would be simpler to have a new
SuiteSparse_NOGPL_jll package. Then in the default build, things stay as
they are. In the no gpl build use the new JLL. In the no GPL build, if
someone then tries to use a GPL SuiteSparse library, a warning can be
printed asking them to get a different build of Julia.

@DilumAluthge @andreasnoack @giordano Thoughts?

Co-authored-by: Viral B. Shah <[email protected]>
@DilumAluthge
Copy link
Member

Is this PR just so that you can get the build from Buildkite, or do you eventually want to merge this into the backports branch?

@gbaraldi
Copy link
Member Author

I just want some buildkite builds

@DilumAluthge
Copy link
Member

I don't know if the PR builds will be codesigned and notarized. If they're not, let me know, and I can try to trigger a manual build.

@DilumAluthge
Copy link
Member

Ah but you'll want to get CI green first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Do not merge this PR!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants