|
Boost-Build : |
Subject: [Boost-build] Alternatives and additional requirements
From: J. van der Wulp (jwulp_at_[hidden])
Date: 2008-10-16 05:38:29
Hello,
I have a small problem with requirements that should be used for
selecting alternatives and additional requirements. Consider a Jamfile
with the following contents:
lib opengl : : <name>GL <link>shared ;
lib opengl : : <name>opengl32 <target-os>windows ;
alias opengl : : <target-os>darwin : : <framework>OpenGL ;
exe a : a.cpp opengl ;
explicit opengl ;
When invoked (on Linux) Boost Build v2 (version from trunk) presents the
following output.
> bjam toolset=gcc link=static
error: No best alternative for ./opengl
next alternative: required properties: <link>shared
not matched
next alternative: required properties: <target-os>darwin
not matched
next alternative: required properties: <target-os>windows
not matched
I would expect that the second and third alternatives are ruled out on
account of the values of the target-os property. So the first
alternative solely remains and should therefore be selected.
The problem is in the <link>shared requirement of the first alternative
of opengl. It is considered for the selection of an alternative but was
not meant to be; it is a additional requirement on one of the
alternatives. However if the <link>shared requirement is left out the
static build fails with:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lGL
Because there is no static version of the GL library. Am I looking at
this in the wrong way? What would be the advised way of doing this?
Thanks in advance,
Jeroen
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