Fix Linux SEGV for symbol conflict

.. mad conflict .. where scipy.stats.linregress conflicts
   with a sndfile and crashes when calling sf_check_fpe

.. see fix stolen from here: https://github.com/scipy/scipy/issues/8130
This commit is contained in:
Mark Liversedge
2017-12-21 16:42:08 +00:00
parent 9599060768
commit 3304e6c72e

View File

@@ -74,6 +74,10 @@ PythonEmbed::PythonEmbed(const bool verbose, const bool interactive) : verbose(v
// our base code - traps stdout and loads goldencheetan module
// mapping all the bindings to a GC object.
std::string stdOutErr = ("import sys\n"
#ifdef Q_OS_LINUX
"import os\n"
"sys.setdlopenflags(os.RTLD_NOW | os.RTLD_DEEPBIND)\n"
#endif
"class CatchOutErr:\n"
" def __init__(self):\n"
" self.value = ''\n"