Hi all,
I am building VTK with the latest conda-build v3 on mac. vtkpython seems to work fine, however importing vtk from python gives me a segfault. Any ideas? (See the attached information)
Python 3.7.1 | packaged by conda-forge | (default, Nov 13 2018, 10:30:07)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import vtk
Segmentation fault: 11
The last 5 stack frames are:
- frame #0: 0x0000000111486f07 libpython3.7m.dylib
PyModule_Create2 + 7 frame #1: 0x00000001113f77a8 libvtkRenderingMatplotlibPython37D-8.2.1.dylib
real_initvtkRenderingMatplotlibPython + 24
frame #2: 0x000000010019e19d python_PyImport_LoadDynamicModuleWithSpec + 557 frame #3: 0x000000010019d5ac python
_imp_create_dynamic + 220
frame #4: 0x000000010002e1a3 python_PyMethodDef_RawFastCallDict + 259 frame #5: 0x000000010002f871 python
PyCFunction_Call + 65
It seems that the latest python from conda is build statically, which means there are going to be two version for the C++ library. Could this be a reason?
otool -L /Users/danlipsa/anaconda3/envs/test-vtk/bin/python
/Users/danlipsa/anaconda3/envs/test-vtk/bin/python:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
An older python from conda links with the following libraries (and that works fine for importing vtk)
(nightly) [~]$ otool -L ~/anaconda3/envs/nightly/bin/python
/Users/danlipsa/anaconda3/envs/nightly/bin/python:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
@rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
(nightly) [~]$ otool -L ~/anaconda3/envs/nightly/bin/python
/Users/danlipsa/anaconda3/envs/nightly/bin/python:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
@rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)