Boost logo

Boost :

From: João Abecasis (jpabecasis_at_[hidden])
Date: 2006-01-05 10:03:41


Daryle Walker wrote:
> I want to try out the documentation run described by the message archived at
> <http://article.gmane.org/gmane.comp.lib.boost.documentation/1472>. I
> downloaded bjam for Mac OS X from our SourceForge download area. I placed
> it in my grand Boost directory in my user directory. (I have separate
> sub-directories for Boost-1.33.1-from-a-ZIP, Boost CVS, and the sandbox
> CVS.) I made a link from bjam to ~/bin. When I ran bjam, I got:
>
> Unable to load Boost.Build: could not find "boost-build.jam"
> ---------------------------------------------------------------
> Attempted search from /Users/daryle up to the root
> and in these directories from BOOST_BUILD_PATH and BOOST_ROOT:
> /usr/share/SOMETHING-I-FORGOT.
> Please consult the documentation at 'http://www.boost.org'.

Bjam looks for a file named boost-build.jam, starting at the current
directory and going up in the directory hierarchy. It also looks at the
paths pointed to by the environment variables BOOST_BUILD_PATH and
BOOST_ROOT. (I'm not sure about the order of these options)

You must do one of the following for bjam to find your Boost.Build
installation:

     * run bjam inside the boost tree
         e.g. /Users/daryle/Boost-1.33.1-from-a-ZIP

     * set up the environment variable BOOST_BUILD_PATH (or BOOST_ROOT)
       to point at the root of the boost tree:
         BOOST_BUILD_PATH=/Users/daryle/Boost-1.33.1-from-a-ZIP

     * set up the environment variable BOOST_BUILD_PATH to point at the
       root of the Boost.Build hierarchy:
         e.g. BOOST_BUILD_PATH=/Users/daryle/
                 Boost-1.33.1-from-a-ZIP/tools/build/v2

The last one has the benefit that you don't need to specify '--v2' on
the command line. Inside the boost tree the first is fine, outside it I
recommend the second one.

> Now, I said I have the Boost files within my user directory, _not_ in a
> system level directory like Boost.Build assumes. I tried exporting a value
> for BOOST_BUILD_PATH to my CVS version of Boost, and it didn't do anything:
>
> Unable to load Boost.Build: could not find "boost-build.jam"
> ---------------------------------------------------------------
> Attempted search from /Users/daryle up to the root
> and in these directories from BOOST_BUILD_PATH and BOOST_ROOT:
> ~/Documents/Programming/Boost/main-cvs/boost/.
> Please consult the documentation at 'http://www.boost.org'.

I imagine you missed the Boost-1.33.1-from-a-ZIP (or other) in
BOOST_BUILD_PATH.

> It doesn't matter if I put "bjam --v2" instead, nor any other command line
> option. Why can't it lock on to my Boost files?
>
> When I say "ran bjam," I just entered "bjam" as a command within a random
> directory, like my home directory, with no special Boost files within it.

That would explain your issue.

> I
> also ran it like the Gmane message, but it still couldn't start up.

Perhaps I wasn't clear on this point in that message, but
BOOST_BUILD_PATH must include the Boost directory as exemplified above.

> A related question: is the regular Boost.Build set-up useful for someone
> that creates Boost libraries using the regular and sandbox CVSes? After
> all, any installed headers and (static and/or dynamic) libraries would get
> stale after any CVS update.

I haven't tried to install or stage with Boost.Build because I haven't
felt the need to so far. Anyway, I believe you are right about the stale
files, you may have to reinstall on every update. Usually, I manually
direct the compiler to the Boost directories or use Boost.Build to
handle Boost dependencies in my projects.

That said, I've used the build system to compile Boost libraries, run
regression tests and to generate QuickBook/BoostBook documentation. I've
done this from both CVS checkouts and from regular releases of Boost.

HTH,
best regards,

João


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk