Python / VTK problem

Randall Hopper aa8vb at ipass.net
Fri Jun 25 13:32:08 EDT 1999


Greg Wilson:
 |Hi, folks.  I've just downloaded, compiled, and installed VTK 2.3, and
 |for the first time, I've built with Python extensions enabled.
 |Unfortunately, while I can run the Tcl examples, I can't get the Python
 |examples to run.  The command 'python mace.py' (or similar) produces:
 |
 |  Traceback (innermost last):
 |    File "./mace.py", line 2, in ?
 |      from libVTKGraphicsPython import *
 |ImportError: /home/gvwilson/lib/libVTKGraphicsPython.so: undefined
 |symbol: XtStrings
 |
 |The symbols XtStrings is defined in /usr/X11R6/lib/libXt.so (I'm on Red
 |Hat Linux).  The directory /usr/X11R6/lib is in my LD_LIBRARY_PATH and in
 |my PYTHONPATH, as is /home/gvwilson/lib (which contains symbolic links to
 |the VTK .so's).  I'd be grateful to anyone who can tell me what I'm doing
 |wrong.

It sounds like libVTKGraphicsPython.so wasn't implicitly linked with
libXt.so when you compiled VTK.  No problems here on IRIX; it appears that
the linker pulled it in automatically.

To check:

   > cd vtk/graphics
   > ldd libVTKGraphicsPython.so
     [you should see libXt.so in the list; but I'd wager that you won't]
   > rm libVTKGraphicsPython.so
   > make
     [VTK doesn't explicitly link in Xt, but it probably should]

A quick nm of the source files linked into libVTKGraphicsPython reveals
that vtkXRenderWindowInteractor.o depends on Xt calls.

Try adding a:

   X_EXTRA_LIBS = -lXt -rpath /usr/X11R6/lib

to your user.make file.

Randall



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list