Partial success Re: [C++-sig] boost.python on OS X 10.3 (Panther)
Rene Rivera
grafik.list at redshift-software.com
Wed Nov 5 00:20:20 CET 2003
[2003-11-04] Bob Ippolito wrote:
>
>On Nov 4, 2003, at 5:37 PM, Ralf W. Grosse-Kunstleve wrote:
>
>> --- Bob Ippolito <bob at redivi.com> wrote:
>>> -bundle_loader is pretty worthless with a framework Python..
>>
>> But as it stands right now I don't know how to get a working build
>> without the
>> -bundle_loader switch. Did you see my other posting with the example
>> compile &
>> link commands?
>>
>> http://mail.python.org/pipermail/c++-sig/2003-November/006188.html
>>
>> How would you modify these command lines?
>
>the last one:
>
>c++ -bundle -bundle_loader
>/Library/Frameworks/Python.framework/Versions/2.3/Python
>/Library/Frameworks/Python.framework/Versions/2.3/Python -o
>libtbx/str_ext.so boost/libs/python/test/str.os -Llibtbx
>-L/net/worm/scratch1/rwgk/hot/libtbx -lboost_python -lm
>
>should be:
>
>c++ -bundle -o libtbx/str_ext.so boost/libs/python/test/str.os -Llibtbx
>-L/net/worm/scratch1/rwgk/hot/libtbx -framework Python -lboost_python
>-lm
I wish... That is what I implemented, and what Ralf tried earlier today, and
it doesn't work.
>see:
>LDSHARED= $(CC) $(LDFLAGS) -bundle -framework $(PYTHONFRAMEWORK)
>
>from:
>/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
>config/Makefile
>
>Basically the deal is that dyld does two level namespaces.. so except
>in the case of umbrella frameworks or libraries (don't try and do this
>for Python), if you don't have the symbol defined in your object file
>it does not get exported. Therefore, anything that uses symbols from
>Python have to get them from the Python framework directly (I'm
>assuming that both libboost_python and str_ext use symbols from
>Python).
The problem isn't in the use of the Python framework but in the use of the
boost_python dylib. As soon as you give the -lboost_python when building a
bundle, which seems to be statically linked, it wants to bind the symbols in
boost_python but because it's a dynamic object it complains that it can't.
This would of course change if Boost.Python itself was built as a framework,
but that's not going to happen any time soon.
-- grafik - Don't Assume Anything
-- rrivera (at) acm.org - grafik (at) redshift-software.com
-- 102708583 (at) icq
More information about the Cplusplus-sig
mailing list