[backports-release-1.13] Revert JLLs to not use LazyLibrary #61735
Draft
topolarity wants to merge 6 commits intoJuliaLang:backports-release-1.13from
Draft
[backports-release-1.13] Revert JLLs to not use LazyLibrary #61735topolarity wants to merge 6 commits intoJuliaLang:backports-release-1.13from
topolarity wants to merge 6 commits intoJuliaLang:backports-release-1.13from
Conversation
…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.
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.
20c1e5c to
f8431d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.