-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add back fs.findObject and fs.readFile in loadLibData #19513
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
Conversation
Can you call the native _dlopen function, since that is where a lot of this logic lives now? |
Copying my response from the other location: There's a few issues. One is asynchronous compilation: A second problem is resolving dynamic library dependencies. If we |
@hoodmane, can you elaborate on why this patch was necessary? I cannot imagine a use-case except maybe if allowing to load libraries from the emscripten virtual file system... PS: |
Well yes that is exactly what we are trying to do. We'd like it if the linker would look at RPATH and LDPATH to locate the libraries from the file system. |
Pyodide is still carrying this patch here: |
What is the reason this did not make it upstream? |
@sbc100 rejected this patch in some other di. I am having trouble finding it right now and annoyingly we didn't cross reference it earlier I just said "Copying my response from the other location". Maybe it was in a Pyodide issue? But I think that essentially the problem with this patch is that it doesn't make Proper RPATH support requires an LLVM change, though a fairly simple one. There's a discussion about that here: @sbc100 what would you think about adding code here that looks at |
Sounds reasonable to me yes. I assume you mean LD_LIBRRARY_PATH rather than LDPATH?
Is one of the problems here that we want this code to work for loading DLLs before the main module is up and running? i.e. before we can run any native code? |
Pinging for any progress here. Interested in the usecase here (possibly not through a patch and through having something upstream) |
Pyodide is using this hook. But if there is some good alternative, we are happy to switch to using it.
The logic we pass for this hook is here:
https://github.com/pyodide/pyodide/blob/main/src/js/dynload.ts#L21-L77
@ryanking13