[C++-sig] Re: Mac OS 10 success

Rene Rivera grafik666 at redshift-software.com
Fri May 23 07:26:51 CEST 2003


[2003-05-21] Ralf W. Grosse-Kunstleve wrote:

>--- David Abrahams <dave at boost-consulting.com> wrote:
>>
>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cctbx/libtbx/libtbx/command_line/mac_os_x_ld_pyd.csh?rev=1.1&content-type=text/vnd.viewcvs-markup
>> 
>> This appears to refer to a removed file (?)
>
>Oh, sorry; I was hoping that the link remains valid because the rev=1.1 is
>explicit.
>
>In the meantime I've done some cleanup work. I attach the essential
compilation
>commands for easy consumption.
>
>Ralf
>
>
>Note that SCons uses the extension ".os" instead of the usual ".o" for
object
>files compiled for shared libraries.
>
>Compiling Boost.Python sources:

These are the bjam equivalents with the current state of darwin-tools.jam...

### currently called as "c++" not "g++"
>g++
    ### <shared-linkable>true (on for DLL and PYD targets)
>   -fPIC
    ### currently set to -ftemplate-depth-120
>   -ftemplate-depth-120
    ### currently set to -Wall ?
>   -w
    ### <optimization>off
>   -O0
    ### <inlining>off
>   -fno-inline
    ### I presume these are set by the libboost_python target?
>   -DBOOST_PYTHON_MAX_BASES=2
>   -DBOOST_PYTHON_SOURCE
    ### <include>$BOOST_ROOT
>   -I/net/cci/rwgk/boost_releases/1_30_0/mac/boost
    ### <include>/Library/Frameworks... (It seems that python.jam would need
to change to look here when the correspoding PYTHON_VERSION is set. That is
setting the PYTHON_ROOT to
"/Library/Frameworks/Python.framework/Versions/$(PYTHON_VERSION)" )
>   -I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
>   -c
>   -o boost/libs/python/src/tuple.os
>   /net/cci/rwgk/boost_releases/1_30_0/mac/boost/libs/python/src/tuple.cpp

>Linking libboost_python.dylib (three commands):

    ### I'm fairly sure there are additional library path seetings here?
    
    ### Yea, that's just what the DLL target does, except for...
    
>ld -dynamic -m -r -d -o libboost_python.lo boost/libs/python/src/numeric.os
>boost/libs/python/src/list.os boost/libs/python/src/long.os
>boost/libs/python/src/dict.os boost/libs/python/src/tuple.os
>boost/libs/python/src/str.os boost/libs/python/src/aix_init_module.os
>boost/libs/python/src/converter/from_python.os
>boost/libs/python/src/converter/registry.os
>boost/libs/python/src/converter/type_id.os
boost/libs/python/src/object/enum.os
>boost/libs/python/src/object/class.os
boost/libs/python/src/object/function.os
>boost/libs/python/src/object/inheritance.os
>boost/libs/python/src/object/life_support.os
>boost/libs/python/src/object/pickle_support.os
boost/libs/python/src/errors.os
>boost/libs/python/src/module.os
>boost/libs/python/src/converter/builtin_converters.os
>boost/libs/python/src/converter/arg_to_python_base.os
>boost/libs/python/src/object/iterator.os
>boost/libs/python/src/object_protocol.os
>boost/libs/python/src/object_operators.os
>
>g++ -nostartfiles -Wl,-dylib -ldylib1.o

    ### <framework>/Library/Frameworks/... (this is currently put in as
<framework>Python, is that enough? Or is the complete path-spec needed?)

>   -framework /Library/Frameworks/Python.framework/Versions/2.3/Python

>-o libtbx/libboost_python.dylib libboost_python.lo
>
>rm -f libboost_python.lo
>
>Compiling an extension module:

    ### Same as the previous comments.

>g++ -fPIC -ftemplate-depth-120 -w -O0 -fno-inline
-DBOOST_PYTHON_MAX_BASES=2
>-Ilibtbx/include -I/net/cci/rwgk/boost_releases/1_30_0/mac/libtbx/include
>-I/net/cci/rwgk/boost_releases/1_30_0/mac/scitbx/include
>-I/net/cci/rwgk/boost_releases/1_30_0/mac/boost
>-I/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c -o
>scitbx/fftpack/boost_python/fftpack_ext.os
>/net/cci/rwgk/boost_releases/1_30_0/mac/scitbx/fftpack/boost_python/fftpack_ext.cpp
>
>Linking an extension module:
>
>g++ -w

    ### I thought -bundle didn't take a value? (Currently only -bundle is
added)

> -bundle /Library/Frameworks/Python.framework/Versions/2.3/Python

    ### <bundle-loader>... (Currently this is added by python.jam as
<bundle-loader>$(PYTHON_ROOT)/bin/python$(PYTHON_VERSION) when building PYD
targets)

>-bundle_loader /Library/Frameworks/Python.framework/Versions/2.3/Python -o
>libtbx/scitbx_boost/fftpack_ext.so
scitbx/fftpack/boost_python/fftpack_ext.os
>-Llibtbx -L/net/cci/rwgk/boost_releases/1_30_0/mac/libtbx
-lscitbx_boost_python
>-lboost_python -lm

So as far as I can see the only changes needed are in python.jam, and
possibly the "-bundle" option in the toolset.

Dave, do you think my comments are enough for you to do the changes? I could
try and do them and post a patch. I'm not about to touch CVS on this one as
it really requires other eyes than mine :-)


-- 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