Menu

#3 Importing pyfaunus into python causes a segmentation fault  Edit

FAQ
accepted
nobody
None
1
2012-08-15
2012-08-15
Mikael Lund
No

This problem is frequently seen on MacOS X with several python distributions installed simultaneously.
If you have multiple python versions installed the _pyfaunus dynamic library must be linked to the same python library as the interpreter. Force this in the ccmake menu or use tricks as below.

Non-system python frameworks may be specified the first time cmake is run. For example, for MacPorts:

$ LDFLAGS=-F/opt/local/Library/Frameworks cmake .

Alternatively, force the dynamic linker to favor a specific framework directory before starting python:

$ export DYLD_LIBRARY_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7
$ ipython

To dermine which python library _pyfaunus is linked againt, do:

$ otool -L swig/_pyfaunus.so

Discussion

Anonymous
Anonymous

Add attachments
Cancel