Closed mducle closed 3 years ago
Seems the only way to solve this is to run then restart the interpreter with os.execv
See: https://stackoverflow.com/questions/6543847/setting-ld-library-path-from-inside-python
This is fixed by the new wrapper script.
On Linux systems, users must set the
LD_LIBRARY_PATH
environment variable before starting Python.At present, the initialisation routines tries to detect where Matlab / MCR is installed and sets this programmatically but this does not seem to be respected by the
mex
files and it fails to load its required libraries.If symlinks to the required libraries (
libmex.so
andlibMatlabDataArray.so
) are provided then a segfault occurs due to incompatibility between the Matlab binaries and the system / Pythonlibstdc++.so.6
andlibgcc_s.so.1
. (WhenLD_LIBRARY_PATH
is defined it is search first before all other search paths so the Matlab provided libraries are picked up when Python loads).