[vtkusers] Strange problem with Python

Harris Scott R Civ AFRL/SNJM Scott.Harris at wpafb.af.mil
Wed Apr 16 15:30:58 EDT 2003

1. If I try to import the libs from an interactive session, things work perfectly.

2. I have two different sets of VTK libraries. The 4.2.2 release and the CVS version. I export
PYTHONPATH to point to the version I want to use. I keep everything in the VTK directory.

3. I don't think I'm doing anything funny with sys.path.

5. No threads!

The strange thing is that both the CVS and 4.2.2 demos work. I can write a 
short test program and it works. Only my app (which is quite large) has problems with
importing the CVS version of VTK. The 4.2.2 version works perfectly with my app. Only 
the CVS version has problems.

If I only import some of the libraries instead of doing
'from vtk import *' I end up causing an similar error to occur in a different
import in a different part of the program. I can chase the error around, but I can't 
eliminate it.

Still baffled,
scottrharris at earthlink.net

>>>>> "HS" == Harris Scott R Civ <Harris> writes:

    HS> I get this error when my program starts:

    HS> 7, in ?  from libvtkImagingPython import * ImportError:
    HS> /home/scott/VTK/bin/libvtkImagingPython.so: R_PPC_REL24
    HS> relocation at 0x0d9a5d48 for symbol `utterworthHighPassPCc'
    HS> out of range

Hmm, I also dont understand the error.  Here are a few thoughts:

 1. What happens if you try this on an interactive session?

    from libvtkImagingPython import *

 How about ldd on libvtkImagingPython.so?

 2. Do you have different versions of the vtk libraries on your
 system?  Or do you have many copies of the libraries, perhaps the
 linker is confused by some older copies.

 3. Are you doing something funny with sys.path in your application?

 4. Are you doing something funny with threads?  A real shot in the

    HS> I don't see the problem with the 4.2.2 relese. I've compiled
    HS> both 4.2.2 and the CVS version with identical options in
    HS> ccmake.

I assume both crash?  Perhaps the presence of both libs is causing the

Good luck!


More information about the vtkusers mailing list