MantisBT - VTK
View Issue Details
0014879VTK(No Category)public2014-07-22 13:112014-10-02 11:27
Casey B Goodlett 
Berk Geveci 
normalminorhave not tried
closedwon't fix 
6.0.0 
 
TBD
crash
0014879: Can not import python modules when compiled against debug version of python
Python can be compiled with a special debugging mode https://docs.python.org/devguide/setup.html#compiling-for-debugging. [^] Example fedora provides python-debug that ships a new executable, library, and include directory with debugging options enabled.

When compiling VTK against the debug version of python the core dynamic modules fail to import. (e.g. below)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/casey.goodlett/common/VTK-debug/Wrapping/Python/vtk/__init__.py", line 39, in <module>
    from vtkCommonCore import *
  File "/home/casey.goodlett/common/VTK-debug/Wrapping/Python/vtk/vtkCommonCore.py", line 1, in <module>
    from vtkCommonCorePython import *
ImportError: No module named vtkCommonCorePython


This is because when compiled against the debug variant of python, the library is expected to be named vtkCommonCorePython_d.so instead of vtkCommonCorePython.so. (not sure if it should be vtkCommonCorePython or vtkCommonCorePythonD). A quick script to create symlinks for all those names enables vtk to import succesfully.

Possible solutions could be one of the following

a) provide symlinks needed for debug version
b) detect compilation against debug python and rename libraries appropriately
No tags attached.
Issue History
2014-07-22 13:11Casey B GoodlettNew Issue
2014-08-24 19:12David GobbiNote Added: 0033287
2014-08-24 19:17David GobbiNote Edited: 0033287bug_revision_view_page.php?bugnote_id=33287#r817
2014-08-24 19:17David GobbiNote Edited: 0033287bug_revision_view_page.php?bugnote_id=33287#r818
2014-10-02 11:27Berk GeveciNote Added: 0033467
2014-10-02 11:27Berk GeveciStatusbacklog => closed
2014-10-02 11:27Berk GeveciAssigned To => Berk Geveci
2014-10-02 11:27Berk GeveciResolutionopen => won't fix

Notes
(0033287)
David Gobbi   
2014-08-24 19:12   
(edited on: 2014-08-24 19:17)
The "D" in vtkCommonCorePythonD actually stands for "dylib", because when the python wrappers were first ported to OS X (many, many years ago) it was necessary to add a .dylib "support library" for every VTK python extension module. It was a poor choice of suffix.

It's definitely only vtkCommonCorePython.so et al that need the "_d". The "D" files aren't python extension modules, they're just ordinary shared libraries.

(0033467)
Berk Geveci   
2014-10-02 11:27   
We don't plan to support this at this point.