[vtkusers] Python 3.5 build failures

David Gobbi david.gobbi at gmail.com
Sun Oct 4 17:03:33 EDT 2015


Hi Matthias,

Thanks for the report.  It looks like the vtkPythonInterpreter module (which
is optional and not needed for the Python wrappers) was not updated for
Python3.  I'll get this fixedASAP, but you can turn this module off as a
temporary work around.

This isn't related to Python 3.5, this particular module doesn't build with
Python 3.4 either.

Ben, can you add Module_vtkPythonInterpreter:BOOL=ON to the Python3
dashboard builds?

 - David


On Sun, Oct 4, 2015 at 2:30 PM, Matthias Blaicher <matthias at blaicher.com>
wrote:

> Hi,
>
> I've just tried to build the master and release-6.3, both fail to build
> for me. However, it used to work some weeks ago. In that time Arch Linux
> switched to Python 3.5. Is the current master branch expected to build
> against Python 3.5?
>
> > In file included from
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:21:0:
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: invalid conversion from ‘char*’ to ‘Py_ssize_t {aka long int}’
> [-fpermissive]
> >  };
> >  ^
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: invalid conversion from ‘PyObject* (*)(PyObject*, PyObject*) {aka
> _object* (*)(_object*, _object*)}’ to ‘setattrofunc {aka int (*)(_object*,
> _object*, _object*)}’ [-fpermissive]
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: cannot convert ‘int (*)(PyObject*, PyObject*, PyObject*) {aka int
> (*)(_object*, _object*, _object*)}’ to ‘PyBufferProcs*’ in initialization
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: invalid conversion from ‘long unsigned int’ to ‘const char*’
> [-fpermissive]
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: cannot convert ‘char*’ to ‘traverseproc {aka int (*)(_object*, int
> (*)(_object*, void*), void*)}’ in initialization
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: cannot convert ‘PyMethodDef*’ to ‘PyMemberDef*’ in initialization
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: cannot convert ‘PyMemberDef*’ to ‘PyGetSetDef*’ in initialization
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h:144:1:
> error: invalid conversion from ‘PyObject* (*)(PyTypeObject*, PyObject*,
> PyObject*) {aka _object* (*)(_typeobject*, _object*, _object*)}’ to
> ‘freefunc {aka void (*)(void*)}’ [-fpermissive]
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:
> In function ‘void {anonymous}::vtkPrependPythonPath(const char*)’:
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:64:54:
> error: ‘PyString_FromString’ was not declared in this scope
> >      PyObject* newpath = PyString_FromString(pathtoadd);
> >                                                       ^
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:
> In static member function ‘static void
> vtkPythonInterpreter::SetProgramName(const char*)’:
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:191:42:
> error: cannot convert ‘char*’ to ‘wchar_t*’ for argument ‘1’ to ‘void
> Py_SetProgramName(wchar_t*)’
> >      Py_SetProgramName(pool.Strings.back());
> >                                           ^
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:
> In static member function ‘static int vtkPythonInterpreter::PyMain(int,
> char**)’:
> >
> /home/mabl/aur/vtk/src/vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:228:28:
> error: cannot convert ‘char**’ to ‘wchar_t**’ for argument ‘2’ to ‘int
> Py_Main(int, wchar_t**)’
> >    return Py_Main(argc, argv);
> >                             ^
> >
> Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/build.make:72:
> recipe for target
> 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o'
> failed
> > make[2]: ***
> [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/vtkPythonInterpreter.cxx.o]
> Error 1
> > CMakeFiles/Makefile2:38331: recipe for target
> 'Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all' failed
> > make[1]: ***
> [Utilities/PythonInterpreter/CMakeFiles/vtkPythonInterpreter.dir/all] Error
> 2
> > make[1]: *** Waiting for unfinished jobs....
>
> Very best,
> Matthias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151004/f89de1ad/attachment.html>


More information about the vtkusers mailing list