[vtkusers] libVTKPatentedPython error

David Gobbi dgobbi at irus.rri.on.ca
Fri Aug 4 13:43:34 EDT 2000


On Fri, 4 Aug 2000, Mike Renfro wrote:

> On Wed, Aug 02, 2000 at 06:40:49PM -0400, David Gobbi wrote:
> > On Wed, 2 Aug 2000, Mike Renfro wrote:
> > > After I installed, I tried to run mcubes.py, but it didn't work:
> > > 
> > > # python mcubes.py
> > > Traceback (innermost last):
> > >   File "mcubes.py", line 10, in ?
> > >     from libVTKPatentedPython import *
> > > ImportError: /usr/local/lib/libVTKPatentedPython.so: undefined symbol:
> > > vtkVolumeReader_Typecast__FPvPc
> >
> > These problems can usually be fixed by forcing the python wrappers to
> > be re-built (clearly the problems shouldn't happen at all, but the
> > dependencies in the makefiles must not be set up quite right).
> 
> Done. Still doesn't work. The script I built to run each morning when
> I come in is as follows:
> 
> cd /usr/local/src/vtk
> cvs -d \
>     :pserver:anonymous at www.visualizationtoolkit.org:/vtk/cvsroot update
> 
> ./configure --with-mesa --with-tcl --with-shared --with-contrib \
>     --with-patented --with-python --with-tkwidget
> touch wrap/vtkWrapPython.c
> make
> make install
> 
> Same errors happen. This is with Python 1.5.2, tcl and tk 8.0.5, gcc
> 2.95.2, and libc6 2.1.3 (standard Debian GNU/Linux 2.2 system). Am I
> going to have to work in C++ or tcl in order to use the decimate
> functions?

You can do a little 'find the missing symbols' detective work.  The
unix 'nm' command will list the symbols in an object file, and 'grep'
can filter the results.

nm patented/libVTKPatentedPython.so | grep vtkVolumeReader_Typecast__FPvPc
         U vtkVolumeReader_Typecast__FPvPc
nm graphics/libVTKGraphicsPython.so | grep vtkVolumeReader_Typecast__FPvPc
004b87f4 T vtkVolumeReader_Typecast__FPvPc

The 'U' means that libVTKPatentedPython.so needs the symbol, the 'T'
means that libVTKGraphicsPython.so defines the symbol.  The c++filt
command (GNU C++ only) can un-mangle the symbols:

c++filt vtkVolumeReader_Typecast__FPvPc
vtkVolumeReader_Typecast(void *, char *)

This function is defined in graphics/python/vtkVolumeReaderPython.cxx in
my copy of VTK.  This file is automatically generated by vtkWrapPython
as part of the build process.

If your copy of graphics/python/vtkVolumeReaderPython.cxx doesn't define
this function, then something must be wrong with the python wrappers.  
If it does, but you still get link errors, then the problem might be
with gcc-2.95 (I'm using egcs-1.1.2).

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario





More information about the vtkusers mailing list