Boost logo

Boost-Build :

Subject: [Boost-build] Errors when using target references to boost libraries
From: Bob Walters (bob.s.walters_at_[hidden])
Date: 2009-09-03 14:04:09

I'm having difficulty referring to targets in the boost library, and
would appreciate any pointers or help on what I may be doing wrong.

I have an stand-alone project which is dependent on boost. I set up
this project with its own Jamroot, which is relatively small. I'm
trying to use the directory//target syntax to refer to libraries in
the boost project. My goal is that using those targets avoids any
need to try to

<File 'Jamroot':>

import common ;
import os ;

local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;

alias libboost_serialization :
$(BOOST_ROOT)/libs/serialization/build//boost_serialization ;
alias libboost_thread : $(BOOST_ROOT)/libs/thread/build//boost_thread ;
alias libboost_filesystem :
$(BOOST_ROOT)/libs/filesystem/build//boost_filesystem ;
alias libboost_system : $(BOOST_ROOT)/libs/system/build//boost_system ;
alias libboost_date_time : $(BOOST_ROOT)/libs/date_time/build//boost_date_time ;

lib stldb
        : src/logging.cpp
        : <include>$(BOOST_ROOT)

When I've tried doing this on MacOSX, it works - the dependencies
resolve and the library builds. Under windows, with MSVC 9.0, I'm
getting an error during the processing of the jam file. The error log
is somewhat long, but the most suggestive bit is:

*** argument error
* rule project.find ( name : current-location )
* called with: ( boost_serialization : )
* missing argument current-location
definition of rule 'find' being called
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:428: in
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:366: in find-really
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:428: in
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:794: in resolve-reference
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:811: in
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:1174: in
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:1224: in
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:710: in generate-really
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:682: in
C:/c++/boost_1_39_0/tools/build/v2/build\targets.jam:258: in
C:/c++/boost_1_39_0/tools/build/v2\build-system.jam:700: in load
C:\\c++\boost_1_39_0\tools/build/v2/kernel\modules.jam:283: in import
C:\\c++\boost_1_39_0\tools/build/v2/kernel/bootstrap.jam:138: in boost-build
C:\\c++\boost_1_39_0\boost-build.jam:16: in module scope

(The above is not the entire output.)

To build I am:
setting BOOST_ROOT in the env to point to my boost_1_39_0 directory.
bjam --debug-building -q toolset=msvc variant=debug link=static

If I abandon the approach of trying to use the target references,
instead providing explicit <file> values for the libraries, then the
build succeeds. So the issue appears to have something to do with the
process of resolving the targets.

I've tried using a boost installation which I built myself using a
pre-built bjam binary
and also tried using the pre-built boost distribution from BoostPro
consulting (with the bjam included therein.)
In both cases, the error that results is the same.

Any help / pointers / alternative techniques are much appreciated.

- Bob Walters

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at