We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66316fd commit 07579eaCopy full SHA for 07579ea
stdlib/public/Python/PythonLibrary.swift
@@ -191,7 +191,9 @@ private extension PythonLibrary {
191
192
static func loadPythonLibrary(at path: String) -> UnsafeMutableRawPointer? {
193
log("Trying to load library at '\(path)'...")
194
- let pythonLibraryHandle = dlopen(path, RTLD_LAZY)
+ // Must be RTLD_GLOBAL because subsequent .so files from the imported python
195
+ // modules may depend on this .so file.
196
+ let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
197
198
if pythonLibraryHandle != nil {
199
log("Library at '\(path)' was sucessfully loaded.")
0 commit comments