Vtk works fine, but not with Python ... ???

Stephan Houben stephan at pcrm.win.tue.nl
Mon May 3 03:20:09 EDT 1999


Travis Oliphant <olipt at mayo.edu> writes:

> > I'm using Python 1.5.2 under RedHat Linux 5.0.  I have recently
> > downloaded and built vtk, including the Python wrappers.  I have
> > followed the instructions given on the vtk web site (summarized
> > below), and the result is a version of vtk which works fine under tcl
> > and as a stand-alone.  All example scripts I try to run via vtk work
> > perfectly.
> > 
> > However, when I try to run any vtk Python examples, I get the
> > following error no matter what script I try to run:
> > 
> >   % python earth.py
> >   Traceback (innermost last):
> >     File "earth.py", line 4, in ?
> >       from libVTKGraphicsPython import *
> >   ImportError: /usr/local/lib/python1.5/lib-dynload/libVTKGraphicsPython.so:
> >       undefined symbol: XtStrings
> 
> No ideas but I'm in the same boat and get the same error, this under
> Redhat 5.2.
> 
> I'd love to hear from somebody who's fixed this problem.

I had the same problem, so I snet mail to the vtk user list, and I got
the following very helpful response from Jan Walter:
----------------------begin quote-------------------------
I'm not sure if I can help you but I had problems with the Python bindings in
VTK 2.1. I had to change some files to make it work. Maybe the same is true for
VTK 2.2:

configure.in:
VTK_SHLIB_BUILD_FLAGS="-shared -rdata_shared"

The "-rdata_shared" was added. I forgot the reason but it seemed to be helpfull.

Kits.make:
diff Kits.make Kits.make.org
99c99
<       ${XLIBS} -lXext -lXt ${X_PRE_LIBS} -lX11 ${X_EXTRA_LIBS} ${DL_LIBS} \
---
>       ${XLIBS} -lXext ${X_PRE_LIBS} -lX11 ${X_EXTRA_LIBS} ${DL_LIBS} \

The missing dependency for libXt.so seems to be the reason the error message:
undefined symbol: XtStrings
-----------------------end quote--------------------------

This solved the problem for me (with VTK 2.2).

Greetings,

Stephan Houben




More information about the Python-list mailing list