<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Yes, it works! Thanks for the help.<br>
I built a cvs version CMake, and rebuilt VTK with <br>
VTK_BUILD_PYTHON_EXECUTABLE. <br>
<br>
Hua <br>
<br>
Andy Cedilnik wrote:<br>
<blockquote type="cite"
cite="mid1026503053.27894.330.camel@xanth.kitwarein.com">
<pre wrap="">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
</pre>
<pre wrap=""><!---->
Try this manually and tell me what happens.
                                Andy
On Fri, 2002-07-12 at 09:37, Hua Qian wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Andy,
Here are the answers to your questions.
1. CMake: 1.2, Pre-compiled binary from <a class="moz-txt-link-abbreviated" href="http://www.cmake.org">www.cmake.org</a>
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:
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap=""></pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""></pre>
</blockquote>
</blockquote>
</body>
</html>