[vtk-developers] Error building Python wrappings of member functions that return vtkVector2i/f with VS2010

David Gobbi david.gobbi at gmail.com
Thu Jun 2 23:13:40 EDT 2011


I suspect that the only reason CMAKE_CXX_MP_FLAG=ON and
CMAKE_CXX_MP_NUM_PROCESSORS=8 caused the problem to
go away was that changing these caused a rebuild of the python
wrappers.  I bet that if you change those flags back again, the
problem will not return.

Tk is not required by the python build, so you are safe in turning off
VTK_USE_TK.  It is only needed for the python vtkTkRenderWidget,
a piece that is strictly optional.

 - David


On Thu, Jun 2, 2011 at 8:35 PM, Takuya OSHIMA
<oshima at eng.niigata-u.ac.jp> wrote:
> Thanks for the inputs. Exactly the same source tree (tree id 0017782)
> was used and I was not able to find a meaningful difference in
> relavant class entries (vtkFreeTypeStringToImage and vtkVector2i) in
> *Hierarchy.txt.
>
> However with the comparison of the dashboard build configs and mine it
> turned out that my settings of CMAKE_CXX_MP_FLAG=ON and
> CMAKE_CXX_MP_NUM_PROCESSORS=8 which I thought were required to enable
> a parallel build were causing the problem. With the variables unset
> the build went fine.
>
> Also as a side note, turning VTK_WRAP_PYTHON on also automatically
> turned on VTK_USE_TK, which caused a CMake error as I don't have any
> of Tk libraries installed. However by manually turning off VTK_USE_TK
> the CMake configuration and the building process went fine, and
> further vtkpython is working fine. Is Tk really required for Python
> wrapping?
>
> Takuya
>
> Takuya OSHIMA, Ph.D.
> Faculty of Engineering, Niigata University
> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>
> There was no meaningful difference in the
> relevant class entries of *Hierarchy.txt
>
> From: David Gobbi <david.gobbi at gmail.com>
> Subject: Re: [vtk-developers] Error building Python wrappings of member functions that return vtkVector2i/f with VS2010
> Date: Thu, 2 Jun 2011 07:37:10 -0600
>
>> The VTK dashboard tests the VTK 5.8 branch on VS2010 with
>> Python every night and has never shown this issue.  On your
>> system, the problem might be an incorrectly generated hierarchy file
>> Filtering/vtkRenderingHierarchy.txt, can you open this file in an
>> editor on both your Windows build and OS X build to see if the
>> vtkVector2i entries are the same in each?
>>
>> Also, just to confirm, do your OS X build and VS2010 build use git
>> checkouts from the same date?  Because the vtkVector header file was
>> recently moved into the VTK/Common directory, and that is what most
>> likely triggerred this issue.
>>
>>  - David
>>
>>
>> On Thu, Jun 2, 2011 at 6:59 AM, Takuya OSHIMA
>> <oshima at eng.niigata-u.ac.jp> wrote:
>>> Hi,
>>>
>>> Trying to build VTK 5.8 branch head on a Windows7/VS2010 system with
>>> Python wrapping ON, I am getting errors compiling Python-wrapper
>>> generated code of class member functions that return vtkVector2i or
>>> vtkVector2f objects.
>>>
>>> For example, in the Python-wrapper generated code of
>>> vtkFreeTypeStringToImage, vtkFreeTypeStringToImagePython.cxx, a piece
>>> of wrapping code for vtkFreeTypeStringToImage::GetBounds()
>>>
>>> static PyObject *
>>> PyvtkFreeTypeStringToImage_GetBounds_s1(PyObject *self, PyObject *args)
>>> {
>>>  vtkPythonArgs ap(self, args, "GetBounds");
>>>  vtkObjectBase *vp = ap.GetSelfPointer(self, args);
>>>  vtkFreeTypeStringToImage *op = static_cast<vtkFreeTypeStringToImage *>(vp);
>>>
>>>  vtkTextProperty *temp0 = NULL;
>>>  vtkUnicodeString temp1;
>>>  vtkVector2i tempr;
>>>  .....(snip).....
>>>
>>> invokes 'undefined type vtkVector2i' at the declaration of variable tempr.
>>>
>>> However, if I build the 5.8 branch head on OS X, the wrapping of
>>> GetBounds() is omitted from the generated *Python.cxx and the whole
>>> VTK builds fine.
>>>
>>> Any thoughts?
>>>
>>> Takuya
>>>
>>> Takuya OSHIMA, Ph.D.
>>> Faculty of Engineering, Niigata University
>>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>



More information about the vtk-developers mailing list