MantisBT - VTK
View Issue Details
0011750VTK(No Category)public2011-01-24 02:332016-08-12 09:55
Gopalakrishna Palem 
Dave DeMarle 
normalmajoralways
closedmoved 
WindowsXp
 
5.8.1 
TBD
incorrect functionality
0011750: CMake generates wrong VTKConfigure.H while using Python Debuggable
For a debug build, the pre-processor constant VTK_WINDOWS_PYTHON_DEBUGGABLE is not being defined in the VTKConfigure.h file generated by CMake, even though a correct Python Debuggable library is supplied.

This is because of bug in the CMakeLists: The CONFIGURE_FILE() is placed *before* the Python detection code INCLUDE(vtkWrapPython)

I have moved the CONFIGURE_FILE() code to after the INCLUDE(vtkWrapPython) and now it generates correctly. Attaching the modified CMakeLists file.
Configure a correct version of Python debuggable library in the CMake and generate the solution for VS2010.

VTKConfigure.h gets generated with VTK_WINDOWS_PYTHON_DEBUGGABLE undefined. This leads to _DEBUG being undefined in vtkPython.h because of a hack at line 35 there.

You will get linker errors because the pYConfig.h specifies a default python27.lib, which conflicts with our supplied python27_d.lib.

# ifdef _DEBUG
# pragma comment(lib,"python27_d.lib")
# else
# pragma comment(lib,"python27.lib")
# endif /* _DEBUG */

The order in CMakeLists is wrong. The correct order should be as below (attached the correctly modified complete file):


#-----------------------------------------------------------------------------
# search Python, Tcl and Java

IF(VTK_WRAP_PYTHON)
  # Tell vtkWrapPython.cmake to set VTK_PYTHON_LIBRARIES for us.
  SET(VTK_WRAP_PYTHON_FIND_LIBS 1)
  INCLUDE(vtkWrapPython)
ENDIF(VTK_WRAP_PYTHON)


#-----------------------------------------------------------------------------
# Configure files with settings for use by the build.
CONFIGURE_FILE(${VTK_SOURCE_DIR}/vtkConfigure.h.in
               ${VTK_BINARY_DIR}/vtkConfigure.h @ONLY IMMEDIATE)
No tags attached.
txt CMakeLists.txt (59,266) 2011-01-24 02:33
https://www.vtk.org/Bug/file/8651/CMakeLists.txt
Issue History
2011-01-24 02:33Gopalakrishna PalemNew Issue
2011-01-24 02:33Gopalakrishna PalemFile Added: CMakeLists.txt
2011-06-16 13:11Zack GalbreathCategoryCMake => (No Category)
2011-09-15 11:15David PartykaProject => TBD
2011-09-15 11:15David PartykaType => incorrect functionality
2011-09-15 11:15David PartykaTarget Version => 5.8.1
2011-09-15 11:15David PartykaAdditional Information Updatedbug_revision_view_page.php?rev_id=390#r390
2013-07-22 17:28Dave DeMarleNote Added: 0031185
2013-07-22 17:28Dave DeMarleStatusbacklog => expired
2013-07-22 17:28Dave DeMarleAssigned To => Dave DeMarle
2016-08-12 09:55Kitware RobotNote Added: 0037217
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0031185)
Dave DeMarle   
2013-07-22 17:28   
If the bug is still present in 6.0.0, please reopen this report.
(0037217)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.