[vtkusers] Python VTK import errors (since upgrade to Ubuntu 8.04)

Hans-Uwe Rempler rempler at mechbau.uni-stuttgart.de
Fri Aug 15 03:48:15 EDT 2008


Hi Mathieu,

first of all, thank you very much for your answer.

Am Donnerstag, den 14.08.2008, 15:33 +0200 schrieb Mathieu Malaterre:
> Hans,
> 
> On Wed, Aug 13, 2008 at 2:01 PM, Hans-Uwe Rempler
> <rempler at mechbau.uni-stuttgart.de> wrote:
> > Hi everybody,
> >
> > since my last system upgrade to Ubuntu 8.04 i'm getting strange errors
> > from "import vtk", even for the standard VTK examples:
> >
> > ---
> > % pwd
> > /usr/share/vtk/GUI/Python
> >
> > % python SphereWidget.py
> > Traceback (most recent call last):
> >  File "SphereWidget.py", line 6, in <module>
> >    import vtk
> >  File "/var/lib/python-support/python2.5/vtk/__init__.py", line 30, in
> > <module>
> >    from filtering import *
> >  File "/var/lib/python-support/python2.5/vtk/filtering.py", line 7, in
> > <module>
> >    from libvtkFilteringPython import *
> > ImportError: /usr/lib/libvtkFilteringPythonD.so.5.0: undefined symbol:
> > _ZN13vtkDataObject26GetAssociationTypeAsStringEi
> > ---
> 
> Looks like a build mismatch.
> 
> What does the following command return on your system:
> 
> $ nm -D /usr/lib/libvtkFiltering.so.5.0 | grep
> _ZN13vtkDataObject26GetAssociationTypeAsStringEi
> 
> It needs to be a 'T' symbol.
> 

It does show a 'T' symbol:
---
% nm -D /usr/lib/libvtkFiltering.so.5.0 | grep _ZN13vtkDataObject26GetAssociationTypeAsStringEi
000ca9f0 T _ZN13vtkDataObject26GetAssociationTypeAsStringEi


> then make sure that /usr/lib/libvtkFilteringPythonD.so.5.0 links to
> /usr/lib/libvtkFiltering.so.5.0 (use ldd).
> 

This seems to be the case:
---
% ldd /usr/lib/libvtkFilteringPythonD.so.5.0
	linux-gate.so.1 =>  (0xb7f51000)
	libvtkFiltering.so.5.0 => /auto/opt/acis_v14.1/libs/libvtkFiltering.so.5.0 (0xb7b39000)
	libvtkCommonPythonD.so.5.0 => /usr/lib/libvtkCommonPythonD.so.5.0 (0xb7a13000)
	libvtkCommon.so.5.0 => /auto/opt/acis_v14.1/libs/libvtkCommon.so.5.0 (0xb787d000)
	libvtksys.so.5.0 => /auto/opt/acis_v14.1/libs/libvtksys.so.5.0 (0xb7850000)
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7838000)
	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7834000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7741000)
	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb771b000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7710000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75c1000)
	libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7507000)
	/lib/ld-linux.so.2 (0xb7f52000)

> You may also want to use 'python -v' so that you can check which
> library is actually dlopen'ed. For instance it needs to be
> '/usr/lib/libvtkFiltering.so.5.0' and not something like
> '/my/other/exotic/path/to/libvtkFiltering.so.5.0'
> 

Did you mean this:
---
% python -v
[...]
>>> import vtk
[...]
from /usr/lib/python2.5/site-packages/apport/packaging.pyc
# /usr/lib/python2.5/shutil.pyc matches /usr/lib/python2.5/shutil.py
import shutil # precompiled from /usr/lib/python2.5/shutil.pyc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/vtk/__init__.py", line 30, in
<module>
    from filtering import *
  File "/var/lib/python-support/python2.5/vtk/filtering.py", line 7, in
<module>
    from libvtkFilteringPython import *
ImportError: /usr/lib/libvtkFilteringPythonD.so.5.0: undefined symbol:
_ZN13vtkDataObject26GetAssociationTypeAsStringEi


As far as i can remember i didn't change anything on the system
configuration concerning VTK or Python...
Do you think this is maybe a general problem which i have to contact the
package maintainer for support (btw, does anybody have his direct e-mail
address or do i have to mail to "Ubuntu MOTU Developers
<ubuntu-motu at lists.ubuntu.com>")?

Am i really the only one who runs into problems while using VTK in combination with Python under Ubuntu v8.04 ???


Greetings,
Uwe





More information about the vtkusers mailing list