Skip to content

Convert more stdlibs to LazyLibraries #58405

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

staticfloat
Copy link
Member

This converts more JLL stdlibs to use lazily-loaded libraries, and as a useful side-effect, causes them to be loaded by absolute path, isolating them all from LD_LIBRARY_PATH-like effects.

@staticfloat staticfloat requested a review from topolarity May 13, 2025 14:38
@staticfloat staticfloat requested a review from giordano as a code owner May 13, 2025 14:38
@staticfloat
Copy link
Member Author

This is a step in the direction of #55478

artifact_dir::String = ""
libcurl_handle::Ptr{Cvoid} = C_NULL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm slightly worried about with this move is that we lose the handle. Some time ago I wanted to use the libblastrampoline handle in a package, and realised that's gone, so I resorted to dlopening libblastrampoline again. Rest looks good to me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it is a slight change in internal API but I think it’s worth it, so that all users of handle-based operations must flow through the dlopen interface to allow for lazy loading

@oscardssmith
Copy link
Member

Have we figured out LazyLibrary/Juliac interop?

This converts more JLL stdlibs to use lazily-loaded libraries, and as a
useful side-effect, causes them to be loaded by absolute path, isolating
them all from `LD_LIBRARY_PATH`-like effects.
@staticfloat
Copy link
Member Author

cmdlineargs test failure will be fixed by JuliaWeb/OpenSSL.jl#40

@IanButterworth
Copy link
Member

Is there a reason this doesn't include SuiteSparse_jll? It's quite an expensive one on macOS because of the dlpath calls

               ┌ 93.5 ms SuiteSparse_jll.__init__()
     94.6 ms  SuiteSparse_jll

@staticfloat
Copy link
Member Author

No reason, I will get them all eventually, or you can try your hand at it! It's pretty mechanical, the only part that requires any thought is filling out the dependencies arrays.

@IanButterworth
Copy link
Member

Gave it a go here #58444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants