Boost logo

Boost-Build :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2006-09-22 14:28:12


We ran into some linking issues on Mac OS X with the Python library.
This patch below *seems* to fix the issue, because the Darwin linker
fails if there are undefined symbols (usually supplied by the Python
library) when linking libboost_python-whatever.dylib. The only ways
to force the linker to ignore those undefined symbols involve -
flat_namespace, which Apple quitely broken in the latest release.

In any case, the change is just to link against the Python libraries
with -framework Python. On other *nix variants, this would be bad,
because we'd end up with two copies of the Python symbols... one
linked into the libboost_python library and the other provided by the
Python interpreter. On Mac OS X, I believe frameworking linking is
always dynamic linking, so the problem doesn't crop up. At least, the
Python tests seem to be running...

I still don't think we're handling extension modules properly. We
should be linking them with -bundle and (possibly) -bundle_loader,
but we aren't. Darwin is such a pain :(

        Doug

--- /u/dgregor/Projects/boost-1.34.0/tools/build/v2/tools/
python.jam 2006-09-21 10:54:35.000000000 -0400
+++ python.jam 2006-09-22 11:29:20.000000000 -0400
@@ -363,19 +363,15 @@
      }
      PYTHON_FRAMEWORK = $(PYTHON_FRAMEWORK:D)/Python ;
- alias python_for_extensions
- :
- :
- :
- : <include>$(includes)
- ;
-
      alias python
        :
        : <os>MACOSX <toolset>darwin
        :
        : <include>$(includes) <framework>$(PYTHON_FRAMEWORK)
        ;
+
+ .alias-defined = true ;
+ alias python_for_extensions : python ;
}
rule init-nt ( version : root ? : includes ? : libraries ? : cygwin-
condition ? )


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk