Python Shared Libraries: RTLD_GLOBAL segfault
问题 I work with a python swig-wrapped C++ library. In it's __init__.py file, it sets the dlopen flag RTLD_GLOBAL before importing the shared object file containing the implementation code. This causes the subsequent import of scipy.linalg to segfault, at least on my machine. I think this behavior depends on the way in which scipy was built and what it's linked against though. # minimal example of what's going on $ cat test.py import sys import ctypes flags = sys.getdlopenflags() sys