[vtkusers] VTK Python on Sun Solaris

Andy Cedilnik andy.cedilnik at kitware.com
Thu Jul 11 17:41:05 EDT 2002


I suspect you are using Sun's C++ compiler. 

The problem is simple; some of the static constructors of C++ classes
are not called in the right order because Python is being build with C
compiler and not C++. So, the solution is to use vtkpython, which is yet
to be made. There is a pore attempt of mine in VTK/Wrapping/Python, but
does not work just yet. I will finish it once I have some more time.

What you can do for now, is to look at that file and try to compile it.
It is called vtkpython.cxx.in. You will have to modify the CMakeLists
files just a bit.

			Andy

On Thu, 2002-07-11 at 16:14, Hua Qian wrote:
> Hello vtkusers,
> 
> I have a lots of troubles with VTK Python wrapping on Solaris.
> I am using Tcl/Tk 8.3.4, Python 2.2.1, VTK CVS  (July 8),
> Sun C/C++ compiler 5.3 (also tried gcc-2.95.3). Python was 
> built with C++ support enabled and static libpython (libpython2.2.a).
> 
> The making for VTK was successful and the tcl wrapping works
> just fine, but the python wrapping doesn't work:
> 
> [hqian at theremin Python-2.2.1]% ./python
> Python 2.2.1 (#6, Jul  8 2002, 18:42:46) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import vtk
> Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "/net/chaos/chaos/data/hqian/VTK/Wrapping/Python/vtk/__init__.py", 
> line 7, in ?
>    from common import *
>  File "/net/chaos/chaos/data/hqian/VTK/Wrapping/Python/vtk/common.py", 
> line 7, in ?
>    from libvtkCommonPython import *
> ImportError: ld.so.1: ./python: fatal: relocation error:
> file /net/chaos/chaos/data/hqian/VTK-sun/bin/libvtkCommonPython.so:
> symbol __1cG__CrunKpure_error6F_v_: referenced symbol not found
> 
> David Gobbi pointed me to Andy Cedilnik's posts in the vtk-developers 
> mailing-list:
>    http://public.kitware.com/pipermail/vtk-developers/2002-May/thread.htm
> I tried Andy's approach, recompiling python (called it vtkpython)  with 
> C++ compiler,
> but I still could not load vtk import python. The error message is 
> different though,
> 
> hqian at theremin Python-2.2.1]% ./vtkpython
> Python 2.2.1 (#4, Jul  8 2002, 08:46:42) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import vtk
> Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "/net/chaos/chaos/data/hqian/VTK/Wrapping/Python/vtk/__init__.py", 
> line 7, in ?
>    from common import *
>  File "/net/chaos/chaos/data/hqian/VTK/Wrapping/Python/vtk/common.py", 
> line 7, in ?
>    from libvtkCommonPython import *
> ImportError: ld.so.1: ./vtkpython: fatal: relocation error:
> file /net/chaos/chaos/data/hqian/VTK-sun/bin/libvtkCommonPython.so:
> symbol __1cDstdEcerr_: referenced symbol not found
> 
> The static lib libpython*.a might be the source of the problem, but the
> python distribution doesn't offer an easy way to build dynamic loaded
> libpython*.so.
> 
> Thanks in advance for any help!
> 
> Hua
> 
> -- 
> Hua Qian, Ph.D.
> Programmer/Analyst
> Imaging Research Laboratories
> Robarts Research Institute
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list