[Boost-users] Bjam problem - again

545 views
Skip to first unread message

Paul A. Bristow

unread,
Sep 23, 2010, 10:12:03 AM9/23/10
to boost...@lists.boost.org
I've moved to a new machine, and I can run bjam jobs from trunk, but when I
try to run sandbox jobs, I am baffled by this message.

Unable to load Boost.Build: could not find build system.
---------------------------------------------------------
I:\boost-sandbox\boost-build.jam attempted to load the build system by
invoking

'boost-build ;'

but we were unable to find "bootstrap.jam" in the specified directory

Unhelpfully, it doesn't seem to reveal what the 'specified directory'
actually is.

The files were copied over from a working system, so I can't see what has
changed.
The jamfile(s) are unchanged.
I've got the following environment variables set:

I:\boost-sandbox>set boost
boost_build_path=i:\boost_1_44_0\tools\build\v2
boost_patches=i:\boost-patches
boost_root=i:\boost_1_44_0
boost_sandbox=i:\boost-sandbox
boost_trunk=i:\boost-trunk

I:\boost-sandbox>bjam --debug_configuration just produces this message.

I:\boost-sandbox>bjam -d5 --debug_configuration > debug.log

produces the attached log, and the trunk log for comparison.

Help!

Thanks

Paul

PS Boost build is undoubtedly clever, but, sadly, not nearly clever enough
for the abuse of very many users, judging by the Google entries for the
above error message :-(

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB UK
+44 1539 561830 07714330204
pbri...@hetp.u-net.com

debug.zip
trunk_debug.zip

Vladimir Prus

unread,
Sep 23, 2010, 11:46:32 AM9/23/10
to boost...@lists.boost.org
Paul A. Bristow wrote:

> I've moved to a new machine, and I can run bjam jobs from trunk, but when I
> try to run sandbox jobs, I am baffled by this message.
>
> Unable to load Boost.Build: could not find build system.
> ---------------------------------------------------------
> I:\boost-sandbox\boost-build.jam attempted to load the build system by
> invoking
>
> 'boost-build ;'

You need to either have BOOST_BUILD_PATH set in environemnt, or specified
as the argument to the above.

Alternatively, you can

1. Go to tools/build/v2
2. Run bootstap.bat
3. Run "./bjam install --prefix=whatever
4. Add whatever/bin to your PATH

in this way, no environment variables will have to be set, but then, you'd
have to repeat (3) every time Boost.Build is changed in a way you care
about.

- Volodya


_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

John Maddock

unread,
Sep 23, 2010, 11:52:58 AM9/23/10
to boost...@lists.boost.org
> I've moved to a new machine, and I can run bjam jobs from trunk, but when
> I
> try to run sandbox jobs, I am baffled by this message.
>
> Unable to load Boost.Build: could not find build system.
> ---------------------------------------------------------
> I:\boost-sandbox\boost-build.jam attempted to load the build system by
> invoking
>
> 'boost-build ;'
>
> but we were unable to find "bootstrap.jam" in the specified directory
>
> Unhelpfully, it doesn't seem to reveal what the 'specified directory'
> actually is.

Paul, is the root directory of the sandbox up to date? A while back I added
some better error handling to the boost-build.jam specifically to address
inscrutable error messages like this. Also added a readme.txt file which
says:

This directory contains the file "boost-build.jam" which search for a Boost
install as follows:

* In a directory specified by the --boost=path command line option.
* In a directory specified by the BOOST environment variable.
* In the directories ../boost and ../Trunk.

In addition the variables BOOST and BOOST_ROOT are set to point to the root
of the Boost install, so to refer to other
Boost libraries and the main Boost headers, your Jamfile should contain
something like:

import modules ;

local boost-path = [ modules.peek : BOOST ] ;

And then you can refer to a Boost library "foo" as:

$(boost)/libs/foo/build//boost_foo

Note that if your project does not specify a Jamroot file, then a default
one is provided for you,
and that this file will automatically add $(BOOST)/ to your include path.

HTH, John.

Paul A. Bristow

unread,
Sep 23, 2010, 12:38:22 PM9/23/10
to boost...@lists.boost.org

OK I've updated and got some more help, but I'm still stuck with

os.environ BOOST_ROOT boost-root =
Jamfile.v2:30: in modules.load
*** argument error
* rule path-constant ( name : value + )
* called with: ( local-boost-root : )
* missing argument value
I:/boost_1_44_0/tools/build/v2/build\project.jam:1002:see definition of rule
'path-constant' being called
I:/boost_1_44_0/tools/build/v2/build\project.jam:310: in load-jamfile
I:/boost_1_44_0/tools/build/v2/build\project.jam:62: in load
I:/boost_1_44_0/tools/build/v2/build\project.jam:168: in project.find
I:/boost_1_44_0/tools/build/v2\build-system.jam:569: in load
I:\boost_1_44_0\tools\build\v2/kernel\modules.jam:283: in import
I:\boost_1_44_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build
I:\boost-sandbox\boost-build.jam:62: in module scope

and tried adding and changing the environment variables so they are now thus

C:\Users\Paul>set boost
BOOST=I:/boost_1_44_0/
boost_build=I:\boost_1_44_0\tools\build\v2\build << or should this be
I:\boost_1_44_0\tools\build??
boost_build_path=i:/boost_1_44_0/tools/build/v2
boost_patches=i:\boost-patches
boost_root=i:/boost_1_44_0/
boost_sandbox=i:\boost-sandbox
boost_trunk=i:\boost-trunk

It seems that boost_root environment variable is not being seen correctly?
So I'm doing something wrong still.

Thanks

Paul

John Maddock

unread,
Sep 23, 2010, 1:22:58 PM9/23/10
to boost...@lists.boost.org
> and tried adding and changing the environment variables so they are now
> thus
>
> C:\Users\Paul>set boost
> BOOST=I:/boost_1_44_0/
> boost_build=I:\boost_1_44_0\tools\build\v2\build << or should this be
> I:\boost_1_44_0\tools\build??
> boost_build_path=i:/boost_1_44_0/tools/build/v2
> boost_patches=i:\boost-patches
> boost_root=i:/boost_1_44_0/
> boost_sandbox=i:\boost-sandbox
> boost_trunk=i:\boost-trunk
>
> It seems that boost_root environment variable is not being seen correctly?
> So I'm doing something wrong still.

Did you get an error message with instructions before this point?

You should need to set just one environment variable:

set BOOST=i:\boost-trunk

and it'll load Boost.Build etc from that. In addition if you don't have a
Jamroot file in your subdirectory then the default one will set up include
paths etc for the main Boost tree.

Note the upper case name as well boost_root won't be seen by the Build
system at all, also use Windows style backslashes for BOOST.

Also which directory are you invoking bjam from?

HTH, John.

PS Just added some more diagnostics to the boost-build.jam file.
Also make sure your bjam.exe is up to date... just in case...

Paul A. Bristow

unread,
Sep 26, 2010, 1:18:11 PM9/26/10
to boost...@lists.boost.org
> -----Original Message-----
> From: boost-use...@lists.boost.org [mailto:boost-users-
> bou...@lists.boost.org] On Behalf Of Vladimir Prus
> Sent: Thursday, September 23, 2010 4:47 PM
> To: boost...@lists.boost.org
> Subject: Re: [Boost-users] Bjam problem - again
>
> Paul A. Bristow wrote:
>
> > I've moved to a new machine, and I can run bjam jobs from trunk, but
> > when I try to run sandbox jobs, I am baffled by this message.
> >
> > Unable to load Boost.Build: could not find build system.
> > ---------------------------------------------------------
> > I:\boost-sandbox\boost-build.jam attempted to load the build system by
> > invoking
> >
> > 'boost-build ;'
>
> You need to either have BOOST_BUILD_PATH set in environemnt, or specified
as
> the argument to the above.
>
> Alternatively, you can
>
> 1. Go to tools/build/v2
> 2. Run bootstap.bat
> 3. Run "./bjam install --prefix=whatever 4. Add whatever/bin to your PATH
>
> in this way, no environment variables will have to be set, but then, you'd
have to
> repeat (3) every time Boost.Build is changed in a way you care about.
>
> > I've changed the environment variables IN UPPERCASE so they are now thus

C:\Users\Paul>set boost

BOOST=i:/boost-trunk
BOOST_BUILD=I:\boost_1_44_0\tools\build\v2\build
BOOST_BUILD_PATH=i:/boost_1_44_0/tools/build/v2
BOOST_ROOT=I:\boost_1_44_0
BOOST_SANDBOX=i:\boost-sandbox
BOOST_TRUNK=i:\boost-trunk

And everything works as expected.

The cause, as usual, was embarrassing simple.

bjam os.environ calls are CASE SENSITIVE, whereas Microsoft is 'don't care'
<curse> ... </curse>.

So showing the environment variables from DOS box was misleading me into
thinking I had set them correctly.
(jamfiles in boost-trunk didn't use environment variables, so didn't care
either...).

In retrospect, I might have suspected this sooner, but hindsight is
wonderful clear, but

"It ain't what you don't know that gets you into trouble. It's what you
know for sure that just ain't so."
Mark Twain

A warning to use only UPPERCASE might keep others from plopping into this
pit.

But thanks.

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB UK
+44 1539 561830 07714330204
pbri...@hetp.u-net.com

Reply all
Reply to author
Forward
0 new messages