Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-04-24 09:34:00


On Sunday 23 April 2006 21:25, Mark Evans wrote:
> Hi folks,

Hi Mark,

> I'm wondering why bjam reports the following error:
>
> /cygdrive/c/mse/proj/boost-build/build/project.jam:602: in
> object(project-attributes)@123.set from module
> object(project-attributes)@123 error: usage-requirements <include>..
> <hptns-stl-version>3 have non-free properties <hptns-stl-version>3
>
> for:
>
> project moblib2
>
> : usage-requirements <include>..
>
> <hptns-stl-version>3
> ;
>
> Why do properties listed for usage-requirements have to be 'free'?

The problem is that non-free usage requirements don't quite work in the way
you'd like, consider:

   lib a : a.cpp : : : <link>static ;
   lib b : b.cpp : : : <link>shared ;
   exe main : main.cpp a b ;

Here, the usage requirements of two libraries conflict. For another example:

   lib a : a.cpp ;
   lib b : b.cpp : : : <link>static ;
   exe main : main.cpp a b ;

it is necessary to notice that 'b' has <link>static, and build 'a' with
<link>static too. However, usage requirements become known only after
building a target, so it's necessary to first build a, then build b, then
notice non-free usage requirements, and then build a again with different
properties.

This all is pretty complex and is not implemented yet. Another approach is to
detected when usage requirements are not satisfied with build properties and
issue an error. So, you you write:

   lib b : b.cpp : : : <link>static ;
   exe main : main.cpp b ;

you get an error, and have to change the code like this:

   lib b : b.cpp : : : <link>static ;
   exe main : main.cpp b : <link>static ;

But this is not implemented either.

- Volodya
   

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

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