Boost logo

Boost-Build :

Subject: Re: [Boost-build] Unable to run sandbox tests in own directory
From: Edward Diener (eldiener_at_[hidden])
Date: 2010-11-30 08:33:31


On 11/30/2010 4:58 AM, John Maddock wrote:
>> Thanks ! Yours is now working but mine is still failing. I have no
>> idea why that is.
>
> Edward, yours is building OK for me now - after a trivial fix to add
> your headers to the include path - committed to SVN - I hope you don't
> mind!

Not at all. I have it now.

>
> If you're seeing errors from boost/config.hpp not being found, then it's
> likely that the top level Jamroot file isn't finding the boost path
> correctly - what environment variables do you have set - or command line
> options?

The top-level jamfile, taken from Daniel James 'example' library, and
modified by me for variadic_macro_data is:

project variadic_macro_data
     : requirements
         <include>.
         <include>$(boost-root)
     :
         build-dir bin.v2
     ;

Does the project name have to match the one in the 'test' directory
jamfile, which you modified, in order for the 'test' directory jamfile
to pick up the two includes above ? Even if I change the project name in
the test directory jamfile from 'variadic_macro_data_tests' to
'variadic_macro_data' I still fail with the same error.

Somehow I think this has to do with project names and project
requirements, and my lack of understanding of how they work together
over different jamfiles. Clearly there are project requirements in the
top-level jamfile for the variadic_macro_data project. Now in my test
jamfile I also have project requirements, and I want to merge these
project requirements with those in my top-level jamfile when executing
the test project, or is not that the idea of having a top=level jamfile
which sets the include paths for both my library and a Boost
implementation ?

No Boost environment variables are set but I am using the --boost=path
option on the command line.

I seem to be struggling with two different setups. One is the setup with
the sandbox top-level jamfiles and the readme.txt instructions there.
The other is the setup based on Daniel James 'example' library jamfiles.
I have no preference with either other than finding one that actually
works given these goals:

1) The end-user should be able to run a sandbox library's jamfiles from
within a sandbox library directory successfully, and use the
--boost=path command-line option to point to a Boost distribution.

2) The end-user should be able to subsequently move only the sandbox
library's 'boost' subdirectory and 'libs' subdirectory to a Boost
distribution and run that library's jamfiles successfully without having
to use the --boost=path command-line option since he is already running
from within a Boost distribution.

3) This is optional, but it does seem to me that depending on the
sandbox's top-level jamfiles, such as the boost-build.jam, Jamroot.jam,
and Jamfile.v2 there in your solution may be flawed. The reason I say
that is because it seems perfectly possible for an end-user to SVN a
sandbox library without either putting it beneath the sandbox directory
or without getting those top-level sandbox files via SVN into that local
sandbox directory. Furthermore someone may have a possible Boost
sandbox-like library, with the recommended directory structure,
somewhere else on the Internet and an end-user might SVN that to
anywhere on his system locally. However, I am perfectly willing to
accept that an end-user using SVN to get a sandbox-like Boost library
needs to put it beneath a sanbox directory with those top-level bjam
files if that is the best solution and it works.

>
> PS just tried this using the --boost=path option and that worked for me
> as well here... shrug...

I wish it worked for me.

I am just trying to get it to work in the easiest possible way given
what I think are reasonable goals as given above. I can not understand
why I find Boost Build such a struggle to work with, but perhaps it is
just me not being willing enough to grapple with all its functionality
and attempt to understand how it actually works when a jamfile is exeuted.

I do think that some form of Boost Build documentation which explains in
copious detail both how a jamfile execution combines all the possible
jamfiles and their data into a build, and also explains how to determine
what is actually happening when a jamfile is executed, would be most
welcome. But my efforts to try to get the Boost Build documentation to
be more understandable to me always fail, since others evidently find
all this stuff perfectly adequate in the documentation. Sorry to let all
this frustration with Boost Build boil over but I have spent much more
time trying to get Boost Build to do what I want to do, which seems like
it should be simple but never is, than any other aspect of programming
with Boost.


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