[vtk-developers] Python Wrapping Error

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu Oct 20 12:00:22 EDT 2011


On Thu, Oct 20, 2011 at 11:56 AM, Sankhesh Jhaveri
<sankhesh.jhaveri at kitware.com> wrote:
> Hello fellow developers,
> Recently, I was running into a problem when building VTK with
> VTK_WRAP_PYTHON checked.
> CMake found the right python headers and library but build failed giving an
> error -
> [  9%] Building CXX object
> Wrapping/Python/CMakeFiles/vtkPythonCore.dir/PyVTKObject.cxx.o
> ~/Projects/VTK/Source-correct-test-failures/Wrapping/Python/PyVTKObject.cxx:381:23:
> error: expected primary-expression before ‘,’ token
> ~/Projects/VTK/Source-correct-test-failures/Wrapping/Python/PyVTKObject.cxx:381:25:
> error: ‘vtk_weakreflist’ was not declared in this scope
> ~/Projects/VTK/Source-correct-test-failures/Wrapping/Python/PyVTKObject.cxx:381:40:
> error: ‘offsetof’ was not declared in this scope
> make[2]: ***
> [Wrapping/Python/CMakeFiles/vtkPythonCore.dir/PyVTKObject.cxx.o] Error 1
> make[1]: *** [Wrapping/Python/CMakeFiles/vtkPythonCore.dir/all] Error 2
> make: *** [all] Error 2
> I did some digging and found that adding #include <vtksys/cstddef> solved
> the problem.
> Is that a valid hack or is it something that I am overlooking?

Is this with a recent VTK? I use GCC 4.6 (which I assume you are using
too), and thought I had fixed these issues in VTK master. We have
dashbboard submissions that are passing too, but perhaps you are using
a different compiiler/distro.

Marcus



More information about the vtk-developers mailing list