bgribble/mfp

ImportError: undefined symbol PyFPE_jbuf

Closed this issue · 0 comments

Just documenting this here in case anyone runs into this problem with MFP. You would see it in the console output with -v and it might or might not prevent MFP from starting up correctly depending on the specifics of which import fails.

The underlying issue is an ABI incompatibility between the Python that you are running MFP with and the Python that compiled one of its dependent extension libraries. The symbol PyFPE_jbuf is defined in Pythons that were compiled with the --with-fpectl config option, and it is referenced in any C extension built by a Python compiled with --with-fpectl.

As I understand the timeline, this option was the default for a long time, then the Python project deprecated it but many distributions still enabled it, and then in summer 2017 Debian started shipping their Pythons without it. That's when problems started for me.

I personally ran into this with the liblo package when it was installed by pip. The version on pypi apparently was built with a --with-fpectl Python and so trying to import it breaks on my local.

I addressed this by installing the Debian-packaged versions of dependencies before build rather than installing from pip with ./waf install_deps.

This Numpy ticket has the best explanation I have seen:
numpy/numpy#8415