[vtkusers] Problem building VTK (CVS) on Mac OS X with Python

Sander Niemeijer niemeijer at science-and-technology.nl
Tue Feb 3 05:37:51 EST 2004


You were right. The fact that I was trying to link the static python  
library against a shared library was indeed the problem. I am now  
trying to use the framework version of Python (which already includes a  
shared library, so I don't have to perform the extra dylib creation  
step that is used for the fink version).
I changed the cmake PYTHON_LIBRARY option to  
-DPYTHON_LIBRARY:FILEPATH='-F/Users/sander/pythonfw -framework Python'  
(I've got my homemade framework installed in /Users/sander/pythonfw)  
and building VTK seems to go fine now (it is still happily crunching  
away, so fingers crossed ;-) )

P.S. I'm still pointing the PYTHON_EXECUTABLE and PYTHON_INCLUDE_PATH  
to my non-framework installation of python, but as far as I can see it  
will be relatively easy to get them to point to the locations within  
the framework. I'll try that as soon as my build finishes.

Thanks!

Regards,
Sander

On maandag, feb 2, 2004, at 13:18 Europe/Amsterdam, Martin Costabel  
wrote:

> Sander Niemeijer wrote:
>> I'm trying to build the CVS version of VTK with Python wrappings on  
>> Mac  OS X (10.3 Panther) using gcc 3.3.
> []
>> Building shared library   
>> /Users/sander/Projects/VTK/build-cvs/bin/libvtkCommonPythonD.dylib...
>> ld: common symbols not allowed with MH_DYLIB output format with the   
>> -multi_module option
> []
>> /Users/sander/python/lib/python2.3/config/ 
>> libpython2.3.a(exceptions.o)  definition of common _PyExc_TypeError  
>> (size 4)
>
> It looks like you don't have a dynamic library libpython2.3.dylib in  
> your python installation. I think having one would solve this problem.
>
> In the Fink package for python23, there is, after the usual configure,  
> make, make install stuff, the following line, an analogue of which you  
> could run, too:
>
>  cc -dynamiclib -all_load -framework System -framework CoreServices  
> -framework Foundation %i/lib/python2.3/config/libpython2.3.a -o
> %i/lib/python2.3/config/libpython2.3.dylib -install_name  
> %p/lib/python2.3/config/libpython2.3.dylib -current_version 2.3  
> -compatibility_version 2.3 -L%p/lib -ldl
>
>
> -- 
> Martin
>




More information about the vtkusers mailing list