Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-04-07 03:26:58


> I'm trying to do a simple boost.build project with a bit
> of hierarchy. The directory tree is:
> BoostBuildSample/
> Jamroot <- defines project BoostBuildSample
> a/
> Jamfile <- defines project BoostBuildSample/a
> a.cpp
> a1/
> Jamfile <- defines project BoostBuildSample/a/a1
> a1.cpp
> a2/
> Jamfile <- defines project BoostBuildSample/a/a2
> a2.cpp
> b/
> Jamfile <- defines project BoostBuildSample/b
> b.cpp
> b1/
> Jamfile <- defines project BoostBuildSample/b/b1
> b1.cpp
> A copy of the source is at URL:
> http://www.rdkit.org/BoostBuildSample.tgz
>
> In the file BoostBuildSample/a/a2/Jamfile I define the following
> target which I attempt to make dependent on the target a1 in project
> /BoostBuildSample/a/a1 and the target a in /BoostBuildSample/a:
>
> lib a2 : a2.cpp
> /BoostBuildSample/a//a # (0) fine!
> #../../a/a1//a1 # (1) this works
> #/BoostBuildSample/a//a1 # (2) this "works"
> /BoostBuildSample/a/a1//a1 # (3) this does not
> ;
>
> the first dependency, labeled (0), is no problem. But getting the
> dependency on /BoostBuildSample/a/a1//a1 is problematic. I list three
> forms, the first two, (1) and (2), work without problems (though form
> (2) will build more than just the target a1), but form (3) fails
> sometimes.
> If I execute bjam in the directory BoostBuildSample or
> BoostBuildSample/a things build fine, including that a2
> project/target. However, if I execute bjam in directory
> BoostBuildSample/a/a2, I get the following error:

What you observe is a known limitation. When you build from root, the
targets in a/Jamfile are built, including this:

        alias children : a1 a2 ;

This cause a/a1/Jamfile to be read, and it defines the /BoostBuildSample/a/a1
project id. So, when we get to build a2, that project id is known, and things work.

However, when you build in /BoostBuildSample/a/a2, the 'alias children' is not
build, and nothing causes a/a1/Jamfile to be read.

You can workaround this by adding:

        use-project BoostBuildSample/a/a1 : a1 ;

to a/Jamfile

There is an issue in the tracker to make project IDs more flexible.

- Volodya

>
> ~/BoostBuildSample/a/a2 > bjam
> Building Boost.Regex with the optional Unicode/ICU support disabled.
> Please refer to the Boost.Regex documentation for more information
> (don't panic: this is a strictly optional feature).
> error: Unable to find file or target named
> error: '/BoostBuildSample/a/a1//a1'
> error: referred from project at
> error: '.'
>
> Am I doing something wrong (not hard to believe) or is this a bug of
> some description?
>
> In case it matters, this occurs with the previous bjam version:
> Boost.Build V2 (Milestone 11)
> Boost.Jam 03.1.13
> as well as the most recent:
> Boost.Build V2 (Milestone 12)
> Boost.Jam 03.1.16
>
> I'm test this with boost 1.34.1 and 1.35.0 built from source under Ubuntu 7.10
>
> Sorry if this is answered in the docs, but I haven't been able to find it.
>
> Thanks for any help,
> -greg
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>


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