Skip to content

[backports-release-1.13] Revert JLLs to not use LazyLibrary #61735

Draft
topolarity wants to merge 6 commits intoJuliaLang:backports-release-1.13from
topolarity:ct/revert-lazy-libraries
Draft

[backports-release-1.13] Revert JLLs to not use LazyLibrary #61735
topolarity wants to merge 6 commits intoJuliaLang:backports-release-1.13from
topolarity:ct/revert-lazy-libraries

Conversation

@topolarity
Copy link
Copy Markdown
Member

LazyLibrary is not supported yet by --trim.

We have plans to support it in 1.14 via TypedCallable or upcoming AbstractLibrary changes (both expected within ~1 mo.), but for now to avoid this regression on 1.13 we have to revert these changes.

Generated by Claude 🤖 .

Needs full human review (by me) before merging.

topolarity added 4 commits May 6, 2026 11:00
…Lang#58444)"

This reverts commit e984c57.

Conflicts caused by subsequent fixes/changes were resolved by re-applying
their semantic intent on top of the restored non-LazyLibrary form:

- LibCURL_jll uses OpenSSL on macOS (16a2bf0) and adds a Zstd_jll dep
  (905a847)
- LibGit2_jll picks up PCRE2_jll and Zlib_jll deps for libgit2 1.9.1
  (a595ea4)

CompilerSupportLibraries_jll, OpenBLAS_jll, and libblastrampoline_jll
remain in LazyLibrary form here; they are handled by the follow-up
revert of 4975b84 ("Initial implementation of lazy JLLs for
LinearAlgebra"). Zstd_jll is also left in LazyLibrary form and will
be converted in a separate, handwritten commit.
This reverts commit 4975b84.

Restores CompilerSupportLibraries_jll, OpenBLAS_jll, and
libblastrampoline_jll to their classic non-LazyLibrary stub form
(string-const + dlopen-in-__init__).

Subsequent fixes that targeted the LazyLibrary form become moot once
the lazy form is gone:

- bc98abc (CSL_jll FreeBSD libatomic path): pre-lazy CSL_jll did not
  declare libatomic at all
- f5278d8 (BundledLazyLibraryPath relative): LazyLibrary-only refactor
- 6eef79c (Restore PATH_list): pre-lazy form already had PATH_list
- f2641f8 (Only define libssp if our CSL install has it): pre-lazy
  form already used dlopen(libssp; throw_error=false), which gracefully
  handles a missing libssp at runtime
- 41699d4 (@static if in CSL_jll.__init__): LazyLibrary-only fix
The previous revert of JuliaLang#58444 dropped libatomic and libquadmath since
the pre-LazyLibrary stub did not declare them, but they had been part
of CSL_jll's public surface since the LazyLibrary conversion.

Re-expose them as classic string-const + handle/path globals to avoid
silently breaking downstream consumers. Both are dlopen'd with
throw_error=false because some CSL installations (notably USE_BINARYBUILDER=0
builds) ship without one or both libraries.
Rewrite the Zstd_jll stdlib stub to the classic string-const + dlopen
form used by the rest of the bundled JLLs. Preserves the public surface
added since the LazyLibrary conversion (libzstd_path, zstd_path,
zstdmt_path, the zstd()/zstdmt() command builders) and the conditional
CompilerSupportLibraries_jll dependency on Windows i686 (where libzstd
links against libgcc_s).

With Zstd_jll no longer using LazyLibrary, the trimming test no longer
needs its vendored copy of Zstd_jll, so drop test/trimming/Zstd_jll/
and the [sources] override.
@topolarity topolarity added the backport 1.13 Change should be backported to release-1.13 label May 6, 2026
@topolarity topolarity changed the title [backports-release-1.13] Revert JLL's to not use LazyLibrary [backports-release-1.13] Revert JLLs to not use LazyLibrary May 6, 2026
topolarity added 2 commits May 6, 2026 18:34
LinearAlgebra.__init__ calls
libblastrampoline_jll.add_dependency!(OpenBLAS_jll, libopenblas, callback)
to register OpenBLAS with LBT. The LazyLibrary-era implementation registered
the callback to be invoked when libblastrampoline got dlopen'd; with the
non-lazy stub form libblastrampoline is already loaded by libblastrampoline_jll's
own __init__ before LinearAlgebra runs, so the shim just invokes the
callback directly.

Restores the public API that LinearAlgebra (and any out-of-tree BLAS
backend that follows the same pattern) depends on without reintroducing
LazyLibrary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.13 Change should be backported to release-1.13

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant