Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-03-19 17:54:38


I've looked into Python issues that occur for Martin. It's pure
linux, no cygwin involved. Locally, I can reproduce them
with the following user-config.jam:

        using gcc ;
        using gcc : 4.1.0 ;
        using gcc : 4.1.2 ;

        using python : 2.4 : /usr : : ;
        using python : 2.4 : /usr : : : <toolset>gcc <toolset-gcc:version>4.1.0 ;
        using python : 2.4 : /usr : : : <toolset>gcc <toolset-gcc:version>4.1.2 ;

The original intention, as I understand it, is to be able to specify custom version
of python for a particular gcc version -- in the real example the paths
to python are different.

With that, and some local patches to improve diagnostics,
running "bjam -n" in libs/python/test, I get:

  error: No best alternative for /python-2.4
    next alternative: required properties: (empty)
             full requirements: <name>python2.4 <toolset>msvc,<runtime-link>shared:<threading>multi
        matched
    next alternative: required properties: (empty)
             full requirements: <name>python2.4 <toolset>msvc,<runtime-link>shared:<threading>multi
        matched

which is no wonder, in fact. Looking at python.jam:declare-libpython-target, I see
that it does not take any parameters for condition, and therefore declares identical
targets if version and target-os are the same. I see the following arrangment:

        local libpython-target-name = [ declare-libpython-target $(version) : $(target-os) : $(condition) ] ;
        alias python
          : $(system-libs)
          : $(condition)
          :
          : <include>$(includes) <library-path>$(libraries) <library>$(libpython-target-name)
          ;

Whereas the 'python' target is declared with 'condition', 'condition' is not passed
to declare-libpython-target, which leads to this problem. I don't quite understand
why this two-stage scheme is used, and there's no comment to explain it.

There are two possible solutions:

1. Pass 'condition' to declare-libpython-target
2. Kill declare-libpython-target, add proper <name> property to 'python' target
directly.

Dave, can you clarify what's the purpose of 'declare-libpython-target'.

- Volodya

        


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