Compile error with python 2.5
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Compiling paraview 2.4.4 again python 2.5 yields the following error:
[ 18%] Building CXX object Utilities/VTKPythonWrapping/CMakeFiles/vtkCommonPython.dir////VTK/Common/vtkPythonUtil.o
/usr/bin/g++ -DvtkCommonPython_EXPORTS -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -Wno-deprecated -fPIC -I/builddir/build/BUILD/paraview-2.4.4/Utilities/VTKPythonWrapping -I/builddir/build/BUILD/paraview-2.4.4/fedora -I/builddir/build/BUILD/paraview-2.4.4/fedora/VTK/Utilities -I/builddir/build/BUILD/paraview-2.4.4/VTK/Wrapping -I/builddir/build/BUILD/paraview-2.4.4/VTK -I/builddir/build/BUILD/paraview-2.4.4/fedora/VTK -I/builddir/build/BUILD/paraview-2.4.4/VTK/Common -I/builddir/build/BUILD/paraview-2.4.4/VTK/Filtering -I/builddir/build/BUILD/paraview-2.4.4/fedora/VTK/Rendering -I/usr/include/python2.5 -DVTK_PYTHON_BUILD -o Utilities/VTKPythonWrapping/CMakeFiles/vtkCommonPython.dir////VTK/Common/vtkPythonUtil.o -c /builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx: In function 'PyObject* PyVTKClassMetaType_GetAttr(PyTypeObject*, char*)':
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx:771: error: invalid conversion from 'const char*' to 'char*'
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx: In function 'PyObject* vtkPythonGetObjectFromObject(PyObject*, const char*)':
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx:1543: warning: dereferencing type-punned pointer will break strict-aliasing rules
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx:1547: warning: dereferencing type-punned pointer will break strict-aliasing rules
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx:1551: warning: dereferencing type-punned pointer will break strict-aliasing rules
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx: In function 'void* vtkPythonUnmanglePointer(char*, int*, const char*)':
/builddir/build/BUILD/paraview-2.4.4/VTK/Common/vtkPythonUtil.cxx:1594: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[2]: *** [Utilities/VTKPythonWrapping/CMakeFiles/vtkCommonPython.dir///__/VTK/Common/vtkPythonUtil.o] Error 1
make[2]: Leaving directory /builddir/build/BUILD/paraview-2.4.4/fedora' make[1]: *** [Utilities/VTKPythonWrapping/CMakeFiles/vtkCommonPython.dir/all] Error 2 make[1]: Leaving directory
/builddir/build/BUILD/paraview-2.4.4/fedora'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.21547 (%build)
The attached patch fixes, but is a hack. Better typing elsewhere would probably fix.