[vtkusers] VTK Python Wrapper and OS X
Glen Lehmann
glehmann at imaging.robarts.ca
Thu Dec 18 10:23:51 EST 2003
Hello Dan,
The problem is the install_names that are associated with the installed
libraries. Try this;
>> cd /usr/local/lib/vtk
>> otool -L libvtkCommonPython
and you'll see that libvtkCommonPython is linked against the absolute
path of the original libraries (i.e. the ones in your VTK/bin)
Attached is a script I wrote to fix this problem. You'll need to modify
the BUILD_PREFIX to match your VTK build location and INSTALL_PREFIX to
/usr/local/lib/vtk. Others have reported that this script hasn't worked
for them on the first attempt (although it does for me) so it may need
some massaging.
After you run it try running "otool -L" again an you'll see the
libraries are now linked against the ones in /usr/local/lib/vtk.
Good Luck,
Glen
Dr. Daniel James White PhD wrote:
> Hi,
>
> I am using vtk on os X 10.2 and 10.3 (built on 10.2) recent CVS
> cmake from kitware (why get it anywhere else?)
> with MacPython (different for 10.2 and 10.3 as panther contains the
> python engine already, but not the extra bits)
> and AquaTckTk Batteries included 8.4 most recent.
>
> I am running the python vtk frontend MayaVi, using native aqua
> interface on OSX
> but I have to run it from the VTK/bin
> directory or the compiled binaries are not found, even after
> make install.
>
> maybe you are seeing something similar.
>
> Dan
>
> On 18 Dec 2003, at 13:25, vtkusers-request at vtk.org wrote:
>
>> -__--__--
>>
>> Message: 3
>> Date: Wed, 17 Dec 2003 10:06:17 -0800
>> From: Jeremy Guralnick <jg at tachyon.net>
>> To: <vtkusers at vtk.org>
>> Subject: [vtkusers] VTK Python Wrapper and OS X
>>
>> I've been trying to get the python wrapper to work under OS X (10.2.8)
>> without success. Whether I use python or vtkpython I get the following
>> error:
>>
>> Python 2.2.2 (#1, 01/12/03, 07:51:34)
>> [GCC Apple cpp-precomp 6.14] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>>
>>>>> import vtk
>>>>
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File
>> "/Users/jg/Tachyon/Develop/VTK/Wrapping/Python/vtk/__init__.py", line
>> 7, in ?
>> from common import *
>> File "/Users/jg/Tachyon/Develop/VTK/Wrapping/Python/vtk/common.py",
>> line
>> 7, in ?
>> from libvtkCommonPython import *
>> ImportError: Loaded module does not contain symbol
>> _initlibvtkCommonPython
>>
>>>>>
>>
>> I've tracked this down to the file
>> ${VTK_DIR}/VTKBuild/Common/vtkCommonPythonInit.cxx, which includes the
>> missing reference from above. The problem appears to be that the build
>> process does not compile this file (no object file produced) or
>> attempt to
>> link it (no link errors). After a build, the "Common" directory
>> contains 301
>> ".cxx" files and 463 ".o" files including 150 object files with
>> "Python" in
>> the filename, so a system appears to be built with the python wrapper.
>>
>> Other than python, the system otherwise works fine. I've run several
>> of the
>> C++ and Tcl tests with no problems. I've also tried both VTK 4.2.2
>> and 4.2.1
>> with the same result. Other data that might help are:
>>
>> cmake 1.6.6 from darwinports
>> Python 2.2.2 from fink
>> Tcl 8.4 from fink
>>
>> Any help/insight on this problem would be greatly appreciated.
>>
>> Jeremy
>>
>>
> Dr. Daniel James White BSc. (Hons.) PhD
> Cell Biology
> Department of biological and environmental science
> PO Box 35
> University of Jyväskylä
> Jyväskylä FIN 40014
> Finland
> +358 (0)14 260 4183 (work)
> +358 (0)414740463 (mob)
>
> http://www.chalkie.org.uk
> dan at chalkie.org.uk
> white at cc.jyu.fi
>
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeVTKInstallNames.csh
Type: application/x-csh
Size: 607 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031218/489367f8/attachment.csh>
More information about the vtkusers
mailing list