[vtkusers] Python 3.5 build failures
Matthias Blaicher
matthias at blaicher.com
Sun Oct 4 17:27:04 EDT 2015
Hi David,
thanks, that helps. However, I think I now found a Python 3.5 issue:
> /home/mabl/aur/vtk/src/vtk/Wrapping/Python/vtkPythonAppInit.cxx: In function ‘int main(int, char**)’:
> /home/mabl/aur/vtk/src/vtk/Wrapping/Python/vtkPythonAppInit.cxx:167:42: error: ‘_Py_char2wchar’ was not declared in this scope
> argv0 = _Py_char2wchar(av0.c_str(), NULL);
> ^
> Wrapping/Python/CMakeFiles/vtkpython.dir/build.make:62: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o' failed
> make[2]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1
> CMakeFiles/Makefile2:53236: recipe for target 'Wrapping/Python/CMakeFiles/vtkpython.dir/all' failed
Looks like _Py_char2wchar is inofficial API and got renamed to
Py_DecodeLocale, see
> https://bugs.python.org/issue18395
Very best and thank you for your work!
Matthias
On 10/04/2015 11:03 PM, David Gobbi wrote:
> 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
> <mailto: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
>
More information about the vtkusers
mailing list