[vtkusers] VTK Python on Sun Solaris

Andy Cedilnik andy.cedilnik at kitware.com
Fri Jul 12 15:44:12 EDT 2002


Well, I just did this using CMake 1.4 beta and I think it is Sun WD6U1
(whatever that means). I turn the CMake option
VTK_BUILD_PYTHON_EXECUTABLE (which only works in CMake 1.4 and newer)
and this is the result:

CC  -I/VTK/Wrapping/Python -I/VTK/Rendering -I/VTK/Hybrid
-I/VTK/Patented -I/VTK-CC -I/VTK/Common -I/VTK/Filtering -I/VTK/Imaging
-I/VTK/Graphics -I/VTK/IO -I/VTK/Utilities/zlib -I/VTK-CC/Utilities/zlib
-I/VTK/Utilities/png -I/VTK-CC/Utilities/png -I/VTK/Utilities/jpeg
-I/VTK-CC/Utilities/jpeg -I/VTK/Utilities/tiff -I/VTK-CC/Utilities/tiff
-I/VTK/Utilities/expat -I/VTK-CC/Utilities/expat
-I/VTK/Common/Testing/Cxx -I/include -I/usr/local/include
-I/include/python1.5    -I/usr/include -c
/VTK-CC/Wrapping/Python/vtkpython.cxx -o vtkpython.o
CC   vtkpython.o -L/VTK-CC/bin -L/lib -ldl -lm -lvtkpng -lvtkzlib
-lvtkjpeg -lvtktiff -lvtkImagingPython -lvtkGraphicsPython -lvtkIOPython
-lvtkFilteringPython -lvtkCommonPython -lvtkIO -lvtkGraphics
-lvtkImaging -lvtkFiltering -lvtkCommon -lvtkIOTCL -lvtkGraphicsTCL
-lvtkImagingTCL -lvtkFilteringTCL -lvtkCommonTCL -lGL -ltk8.2 -lXt  -lSM
-lICE  -L/usr/lib -R/usr/lib -lX11 -lXext -lsocket  -lnsl
-lvtkRenderingPython -lvtkRendering -lvtkPatentedPython -lvtkPatented
-lvtkHybridPython -lvtkHybrid -ltcl8.2 -lvtkRenderingPython
-lvtkImagingPython -lvtkIOPython -lvtkGraphicsPython
-lvtkFilteringPython -lvtkCommonPython -lpython1.5 -lvtkRendering
-lvtkftgl -lvtkfreetype -lGL -lXt  -lSM -lICE  -L/usr/lib -R/usr/lib
-lX11 -lXext -lsocket  -lnsl -lvtkImaging -lvtkIO -lvtktiff -lvtkpng
-lvtkzlib -lvtkjpeg -lvtkexpat -lvtkGraphics -lvtkFiltering -lvtkCommon
-lm -ldl -R/VTK-CC/bin:/lib  -o /VTK-CC/bin/vtkpython

That produced file:
vtkpython:      ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, not stripped

./bin/vtkpython                                                
vtk version 4.1.1, vtk source $Revision: 1.1274 $, $Date: 2002/07/12
02:45:03 $ (GMT)
Python 1.5.2 (#6, May 22 2002, 10:19:29) [C] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 


Try this manually and tell me what happens.

				Andy

On Fri, 2002-07-12 at 09:37, Hua Qian wrote:
> Hi Andy,
> 
> Here are the answers to your questions.
> 
> 1. CMake: 1.2, Pre-compiled binary from www.cmake.org
> 2. Sun WorkShop 6 update 2 C/C++ 5.3
> 3.  /opt/SUNWspro/bin/CC -o vtkpython \
>           Modules/vtkpython.o libpython2.2.a -lsocket -lnsl -ldl 
> -lpthread -lthread -lm 
> 
> vtkpython.cc:
> /* Minimal main program -- everything is loaded from the library */
> 
> #include "Python.h"
> #include <iostream>
> 
> extern "C"
> DL_EXPORT(int) Py_Main( int argc, char *argv[] );
> 
> int main( int argc, char *argv[] )
> {
>         return Py_Main(argc, argv);
> }
> 
> Hua          
> 
> 
> Andy Cedilnik wrote:
> 
> >Sorry, I did not read the whole e-mail...
> >
> >So, the first part:
> >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
> >
> >bla__CrunKpure__bla  is from "standard" C++ library on Sun. I had the
> >same problem until I compiled the whole thing using C++.
> >
> >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
> >
> >bla__1cDstdEcerr__bla is as you can guess cerr. This means it does not
> >get initialized properly. So, I guess to go from here, let us try to
> >answer couple of simple questions:
> >
> >1. What version of CMake?
> >2. What version of Sun C++?
> >3. What exactly does compile line for vtkpython look like?
> >
> >				Andy
> >
> >On Fri, 2002-07-12 at 07:39, Prabhu Ramachandran wrote:
> >  
> >
> >>>>>>>"AC" == Andy Cedilnik <andy.cedilnik at kitware.com> writes:
> >>>>>>>              
> >>>>>>>
> >>I think Hua has already tried this out and linked the vtkpython
> >>executable to libpython.a.  However, this approached failed again.
> >>
> >>Any ideas why this happens even with the vtkpython binary?  I dont
> >>have much experience with Solaris to really answer.
> >>    
> >>
> >
> >
> >_______________________________________________
> >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
> >  
> >
> 
> -- 
> Hua Qian, Ph.D.
> Programmer/Analyst
> Imaging Research Laboratories
> Robarts Research Institute
> 
> 





More information about the vtkusers mailing list