Boost logo

Boost-Build :

Subject: Re: [Boost-build] Bug concerning --help, --version, etc.
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2014-11-17 22:20:19

On Mon, Nov 17, 2014 at 3:27 PM, Michael Rolle <m_at_[hidden]> wrote:

> 1. I believe bjam couldn't find the build system because of the mistake
> in libs/python/examle/boost-build.jam, which I have reported elsewhere.

OK, I wasn't aware of that.

2. I didn't notice the -h or -v switches. I now see that --help lists -v.
> But there is no -h. -v is different from --version in its output.

Or, right, no -h option. But it does have the effect of listing the b2
interpreter options :-)

> 3. I see that I get the same problem whether there is a jamfile or not.
> bjam first looks for boost-build.jam, so if I run bjam from, say, C:\, I
> get the message about no build system, and no --help.


> 4. If bjam.exe will process -v before trying to load the build system,
> then couldn't you also look for --help and --verbose as well, rather than
> passing those args to the build system once it is found? So I beg to
> disagree with you when you say my proposed change can't be done.

OK.. A structural explanation is in order..

1) b2.exe (or bjam.exe) is the Jam language interpreter core (and ultimate
build execution core). It is written in C and compiled to the executable.

2) Boost.Build v2 (aka bbv2) is the build system written in the Jam
language and is interpreted and executed when found and loaded.

When b2.exe is executed it has code in it that searches for the "current"
build system. It uses a search algorithm that allows for *many* different
versions of bbv2 to coexist. Commonly different bbv2 versions per project
are used. This is to guarantee that the build files (Jamfile/s) are matched
to the bbv2 version correctly. In particular for Boost bbv2 is included in
the boost-root/tools/build dirs. So.. b2.exe is compiled and can't easily
change. And bbv2 is interpreted as is easily changed and can vary per
project, user, and/or project. With that in mind..

The "-v" option prints the version of the b2.exe interpreter core. And the
"--version" option prints the version of the dynamically found and loaded
bbv2 system. And hence *can't* be printed if it can't dynamically find and
load the bbv2 system. The "--help" option is also dynamically processed and
generated for the bbv2 system it loads, and for the project you are
building, and for the directory you are in. In particular the help
information is extracted straight from the *.jam files that make up the
bbv2 system and the project Jamfile/s. For example the Boost --help
documentation is here <>. The mechanics
of the "--help" option itself are written in the Jam language and hence
also interpreted <>. I.e. the
"--help" is part of the bbv2 system.


-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams -
-- rrivera/ (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at