Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2006-01-06 20:08:32


On 1/5/06 11:14 PM, "Deane Yang" <deane_yang_at_[hidden]> wrote:

> Daryle Walker wrote:
>> Following another response, I created a "~/boost-build.jam" file with:
>>
>> //========================================================================
>> boost-build ~/Documents/Programming/Boost/main-cvs/boost/tools/build/v2 ;
>> //========================================================================
>>
>> as its only line...
>
> Oops. I forgot to mention that the path should be relative to the
> directory that the file boost-build.jam is in.
>
> [After Daryle figures this out himself]

Actually, I didn't. I was just hacking around.

>> daryle[doc]$ bjam
>> Jamfile: No such file or directory
>> Jamfile: No such file or directory
>> ..found 8 targets...
>> daryle[doc]$ bjam --v2
>> error: Boost.Jam version 3.1.12 or later required
>>
>> //========================================================================
>>
>> At least I'm closer than before....
>>
>
> Yes, you are. And I got this same error message, too. Unfortunately, I
> don't remember how I resolved this.
>
> But I suggest looking at:
> http://www.boost.org/doc/html/bbv2/installation.html
> and
> http://www.boost.org/tools/build/jam_src/index.html#building_bjam

I followed the second link to create a bjam file. It put it in a
"bin.macosxppc" sub-directory, and I copied the "bjam" inside to "~/bin"
which is in my $PATH.

How do I activate the clean target? Neither "sh ./build.sh clean" nor "sh
/build.sh darwin clean" worked. I want to do this so later CVS updates
won't detect the building files (and report them as unregistered).

Will this script always create a "bjam" file blindly, or will it do
dependency checking and only build as necessary? I need some way to do the
latter. I currently have a crude script to update my main and sandbox Boost
CVSes. I would want to extend this to automatically make a new "bjam" if
needed, copy it to "~/bin" (over-writing any previous version), and clean
the building files out of my CVS working copy. My script so far is:

//=======================================================================
cd ~/Documents/Programming/Boost/main-cvs
cvs -z3 -q -d:ext:MY_ID_at_[hidden]:/cvsroot/boost update -dP boost

cd ~/Documents/Programming/Boost/sandbox-cvs
cvs -z3 -q -d:ext:MY_ID_at_[hidden]:/cvsroot/boost-sandbox update
-dP boost-sandbox
//=======================================================================

(I think there's some accidental word-wrap.)

> In particular, I recommend downloading the latest from the CVS
> repository and building bjam from scratch. Do "bjam --version" to test
> whether you've got things set up OK.

I don't think it's OK. After changing my "~/.profile" to remove the
BOOST_BUILD_PATH export (and resetting), I ran the command from the
"jam_src" directory, getting:

//=======================================================================
daryle[jam_src]$ bjam --version
Jamfile: No such file or directory
Jamfile: No such file or directory
..found 8 targets...
//=======================================================================

Doing it from my home directory gets:

//=======================================================================
daryle[daryle]$ bjam --version
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/boost-build.
Please consult the documentation at 'http://www.boost.org'.
//=======================================================================

I'm keeping Boost local to my account, so "/usr/share/boost-build" does not
exist.

However, when I tried Boost.Build v2 from the "jam_src" directory, I got a
processing delay and then the following:

//=======================================================================
daryle[jam_src]$ bjam --v2
warning: Python location is not configured
warning: the Boost.Python library won't be built
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(and if you don't know what ICU is then you probably don't need it).
###
### No toolset specified. Please use --toolset option.
###
### Known toolsets are: acc, borland, cc, como, darwin, gcc, gcc-nocygwin,
intel-linux, intel-win32, kcc, kylix, metrowerks, mingw, mipspro, msvc, qcc,
sunpro, tru64cxx, vacpp, vc7, vc8, vmsdecc
###
//=======================================================================

I don't want to try this with the "darwin" toolset until I know more about
what's happening. Anyway, I'm trying out Boost.Build to do that
documentation demonstration, I do _not_ want to build actual libraries or
install any headers or libraries. (I believe in adding headers and source
code to my project file, so I never have to worry about mismatched compiler
settings. Can you even mix Boost.Build material with Xcode?)

I think Mac OS X 10.4 comes with both Python and ICU. How would I tell
Boost.Build to use the appropriate system library files?

> I recommend downloading the PDF version of the Boost Build V2
> documentation and keep looking through it. It's a little disorganized,
> but if you keep reading it, you eventually find almost everything you
> need. For the rest, there's the boost.build mailing list.
>
> Also, make sure you edit user-config.jam properly.
>
> But keep trying! It is well worth the effort. Once you figure out bjam,
> you can suddenly compile your libraries on different platforms
> effortlessly using the exact same setup and sequence of commands. All
> the headaches with figuring out the right linker and linker options to
> use for each platform just disappear (because someone smarter than me
> has figured it all out and configured bjam to do the right thing).

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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