[vtkusers] Python 3.5 build failures

Matthias Blaicher matthias at blaicher.com
Sun Oct 4 16:30:28 EDT 2015


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




More information about the vtkusers mailing list