Boost logo

Boost :

From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2002-10-15 11:16:22

AFAIK the gcc toolset is not configured for Mac OS X.

Before the release of 1.29.0 I made an effort to port Boost.Python
to Mac OS X, using a fresh 10.2 install with the latest (Jun or Jul?)
developer kit + Aug patch. My first result is posted here:

After a few days of getting no feedback at all I started poking around
in the Boost.Python source code. The errors that I posted all point to
an inline template function in (upcast_impl). After manually inlining
this function and removing it the errors changed from "upcast_impl same
in two modules" to "upcast same in two modules". Then I removed the
function body in upcast and replaced it by "return 0;". That only lead
to yet another kind of link errors, saying that "common" symbols are
not allowed in dynamic libraries. This even though I used -fno-common
for all files involved. At this point I gave up.

Related observations: I have a stand-alone (independent of Boost.Python)
library that I can use under Mac OS X when using the "ar" command and
static linkage. Attempts to used "c++ -dynamiclib" lead to libtool
errors related to template instantiations. This makes me wonder if
Apple's support for template-heavy dynamically linked libraries is
mature enough for general use. On the other hand, I have a "minimal"
test (which I could post on request) indicating that Boost.Python
should work in principle. More research is required to figure out what
causes the dynamic linker to fail, and if it is possible to work around
the deficiencies.


--- Mark Rowe <bdash_at_[hidden]> wrote:
> I was thinking of moving an existing project using SWIG over to
> boost::python now that version two is out. When i attempt to compile
> boost::python, i get many errors, all relating to 'template with C
> linkage'.
> A small snippet of the build logs follows:
> [mark:libs/python/build] mark% bjam -sTOOLS=gcc -sPYTHON_ROOT=/sw
> ...found 932 targets...
> ...updating 54 targets...
> gcc-C++-action
> In file included from
> /Users/mark/boost_1_29_0/boost/python/object_core.hpp:9,
> from
> /Users/mark/boost_1_29_0/boost/python/object.hpp:9,
> from /Users/mark/boost_1_29_0/boost/python/list.hpp:9,
> from ../src/list.cpp:6:
> /Users/mark/boost_1_29_0/boost/type.hpp:15: template with C linkage
> I am running Mac OS X (10.1.5), with the April 2002 Developer tools
> installed. Any help would be apreciated.

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More

Boost list run by bdawes at, gregod at, cpdaniel at, john at