Subject: Re: [Boost-build] Building Boost with multiple python versions
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2017-02-15 16:32:10
On 15.02.2017 11:25, Rene Rivera wrote:
> On Wed, Feb 15, 2017 at 10:23 AM, Stefan Seefeld via Boost-build
> <boost-build_at_[hidden] <mailto:boost-build_at_[hidden]>> wrote:
> Hi Aaron,
> On 15.02.2017 11:18, Aaron Boman via Boost-build wrote:
> > The "using" rule is a convenience rule:
> > using MODULE_NAME : field1 : field 2 : ... : field9 ;
> > The above essentially does this:
> > import MODULE_NAME ;
> > MODULE_NAME.init field1 : field2 : ... : field9 ;
> > So, if you look at the gcc.jam module, you'll notice that its init()
> > rule's signature is this:
> > rule init ( version ? : command * : options * )
> > Thus, the using rule would be used like this:
> > using gcc : $(valid-gcc-module-version-string) :
> > $(optional-command-to-gcc-exe) : $(options) ;
> > Where $(options) can be something like <root>root/directory or
> > <flavor>mingw.
> > You can find the using() rule's definition in the toolset module.
> thanks, but I don't think that answers any of the questions.
> Specifically, my last question was about the 'version' argument to the
> gcc.init() function. Is it used to identify a compiler by version ? Or
> can it be an arbitrary string / discriminator I use to configure
> compilers with different flags (e.g. `--std=c++11` vs.
> `--std=c++03`) ?
> For gcc it can be an arbitrary string.
How then does
using gcc : 6.3 ;
using gcc : 5.3 ;
work in practice ? How does b2 look up the appropriate compilers, if it
doesn't somehow match the version strings in the above snippet with the
output of `gcc --version` ?
> If I understand the python init code correctly, which is a challenge
> even for me, for python it must be the version of the interpreter (ie
> it checks that it matches).
OK. So for Python the proposed trick of using a "labeled version" to
name a specific Python instance unambiguously (e.g. in the presence of a
32-bit Python and a 64-bit Python of the same version) wouldn't work, yes ?
-- ...ich hab' noch einen Koffer in Berlin...
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