[vtkusers] Building latest VTK with Python Wrapping

Michka Popoff michkapopoff at gmail.com
Wed Apr 24 07:10:29 EDT 2013


Hi

I want to install the latest VTK with Python wrapping. I was able to install and use the 5.10.1 without problems, but now I want to try the latest development version. The make command gets stuck at 47% :

Scanning dependencies of target vtkWrappingPythonCore
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/vtkPythonArgs.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/vtkPythonCommand.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/vtkPythonOverload.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/vtkPythonUtil.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/PyVTKClass.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/PyVTKMutableObject.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/PyVTKObject.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/PyVTKSpecialObject.cxx.o
[ 47%] Building CXX object Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/PyVTKTemplate.cxx.o
Linking CXX shared library ../../lib/libvtkWrappingPython27Core-6.0.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [lib/libvtkWrappingPython27Core-6.0.so.1] Erreur 1
make[1]: *** [Wrapping/PythonCore/CMakeFiles/vtkWrappingPythonCore.dir/all] Erreur 2
make: *** [all] Erreur 2


Does someone have an idea why I got this problem ? My python installation was made from source (python 2.7) with make altinstall (I had to specify the python library path manually in cmake). The Shared Library option is set to ON. What is this -fPIC options and where can/should I use it.

Thanks in advance

Michka Popoff


More information about the vtkusers mailing list