Boost logo

Boost-Build :

Subject: Re: [Boost-build] building boost python --threading mystery ?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-10-23 04:34:21


On Friday, October 15, 2010 17:39:53 Avi Bahra wrote:
> Trying to understand --threading option when applied to building boost
> python On Linux with gcc it appears to have no effect.
>
> bjam toolset=gcc --with-python link=shared variant=debug
> --threading=single Building the Boost C++ Libraries.
> ...patience...
> ...patience...
> ...found 1489 targets...
> ...updating 40 targets...
> common.mkdir bin.v2
> common.mkdir bin.v2/libs
> common.mkdir bin.v2/libs/python
> common.mkdir bin.v2/libs/python/build
> common.mkdir bin.v2/libs/python/build/gcc-4.2.1
> common.mkdir bin.v2/libs/python/build/gcc-4.2.1/debug
> common.mkdir bin.v2/libs/python/build/gcc-4.2.1/debug/threading-multi
> gcc.compile.c++
> bin.v2/libs/python/build/gcc-4.2.1/debug/threading-multi/numeric.o
>
>
> When I specify "--threading=single" it appears to be ignored:
> Even putting a rubbish value has no effect ? --threading=gooblygook

Why are you using 'link' and 'variant' without two dashes, and "--threading"
with two dashes? That's why it's ignored.

> bjam toolset=gcc --with-python link=shared variant=debug
> --threading=gooblygook nBuilding the Boost C++ Libraries.nn
> ...patience...
> ...patience...
> ...found 1489 targets...
> ...updating 19 targets...
> gcc.compile.c++
> bin.v2/libs/python/build/gcc-4.2.1/debug/threading-multi/object/function.o
>
>
> However if you have Jamfile that has "using python" like boost python
> examples then it gets built as :
> bjam
> ...patience...
> ...patience...
> ...patience...
> ...found 12311 targets...
> ...updating 42 targets...
> common.mkdir /var/tmp/ma0/boost/boost_1_43_0/bin.v2
> common.mkdir /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs
> common.mkdir /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs/python
> common.mkdir /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs/python/build
> common.mkdir
> /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs/python/build/gcc-4.2.1
> common.mkdir
> /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs/python/build/gcc-4.2.1/debug
> gcc.compile.c++
> /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs/python/build/gcc-4.2.1/debug/nu
> meric.o gcc.compile.c++
> /var/tmp/ma0/boost/boost_1_43_0/bin.v2/libs/python/build/gcc-4.2.1/debug/li
> st.o
>
> This time there is no mention of threading ?
>
> So it appears that when building boost python at $BOOST_ROOT level it
> is fixed as multi threaded
> but then gets ignored when building python extensions. The net result
> being two builds
> of boost python.

Sorry, I don't understand what the problem is. Indeed, building entire Boost
uses threading=multi by default. Python examples appear to not. Do you
suggest that Python examples be fixed to use threading=multi, too?

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

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