
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'. 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'. 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. I also ran it like the Gmane message, but it still couldn't start up. 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. -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

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

João Abecasis wrote:
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
Another possibility---the one I use---is to put a file called "boost-build.jam" at the top of your directory tree (containing anything that needs to be bjammed) containing a single line: boost-build vendor/boost/tools/build/v2 ; (Replace "vendor/boost/tools/build/v2" by the appropriate path for your boost installation)

On 1/5/06 10:03 AM, "João Abecasis" <jpabecasis@gmail.com> wrote:
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.
No I didn't. It's right there; it's pointing at my CVS version of Boost at "~/Documents/Programming/Boost/main-cvs/boost/". That the directory that includes "boost", "libs", "LICENSE_1_0.txt", and a "boost-build.jam". 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. Running "bjam" from my home directory (i.e. "~") gave me a different result: //======================================================================== Unable to load Boost.Build: could not find build system. --------------------------------------------------------- /Users/daryle/boost-build.jam attempted to load the build system by invoking 'boost-build ~/Documents/Programming/Boost/main-cvs/boost/tools/build/v2 ;' but we were unable to find "bootstrap.jam" in the specified directory or in BOOST_BUILD_PATH (searching /Users/daryle/~/Documents/Programming/Boost/main-cvs/boost/tools/build/v2, ~/Documents/Programming/Boost/main-cvs/boost/). Please consult the documentation at 'http://www.boost.org'. //======================================================================== Wait a minute, I see a possibly inappropriate "~" still in the path. I'll try changing my "~/boost-build.jam" to: //======================================================================== boost-build /Users/Daryle/Documents/Programming/Boost/main-cvs/boost/tools/build/v2 ; //======================================================================== (That's one line, BTW.) Now I get a different result when I run "bjam" from my home directory: //======================================================================== error: Boost.Jam version 3.1.12 or later required //======================================================================== Now I'll change my "~/.profile" to change the export of "BOOST_BUILD_PATH" to substitute "/Users/Daryle" instead of "~". Unfortunately, the result didn't change. Finally, I got rid of "~/boost-build.jam" (by renaming). Now running "bjam" in my home directory gives: //======================================================================== Jamfile: No such file or directory Jamfile: No such file or directory ..found 8 targets... //======================================================================== When I try out the directions in the web page <http://article.gmane.org/gmane.comp.lib.boost.documentation/1472>, I get: //======================================================================== daryle[boost-doc-sample]$ cd libs/ntp/doc daryle[doc]$ bjam --v2 -a -n error: Boost.Jam version 3.1.12 or later required 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.... -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

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]
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 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 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).

On 1/5/06 11:14 PM, "Deane Yang" <deane_yang@yahoo.com> 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@cvs.sourceforge.net:/cvsroot/boost update -dP boost cd ~/Documents/Programming/Boost/sandbox-cvs cvs -z3 -q -d:ext:MY_ID@cvs.sourceforge.net:/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

Daryle Walker wrote:
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.
Sounds good.
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.
This is a good question that I'll leave to the experts. In particular, is it a bad idea to have a Jamfile or Jamfile.v2 (or both) in the jam_src directory that includes a clean target? This would allow you to rebuild using bjam itself.
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: (description of errors from doing "bjam --version" deleted)
Yes, you're right! I never noticed that this only works under certain circumstances. Here's what seems to work for me: Go to the directory that contains the boost-build.jam file (which in turn contains the relative path to boost/tools/build/v2 directory) and run "bjam --version" there. That seems to work for me (but I get the same errors you got when I do the same things you did).
However, when I tried Boost.Build v2 from the "jam_src" directory, I got a processing delay and then [errors ensue]
You need to have a proper v2 Jamfile in a directory to run "bjam --v2". The jam_src directory does not. A better idea is to test "bjam --v2" in boost/tools/build/v2/example/hello (after you've edited user-config.jam; if you have VC++ of any recent version installed in a standard location, just put "using msvc : all ;"; if you have gcc in your path, then just use "using gcc ;"). If that works, then try bjam in the directory boost/tools/quickbook. Finally, you can try running it in boost/doc (which won't work unless you have all of the tools properly installed; this is yet another challenge).
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?)
Which documentation demonstration?
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?
Best left for MacOSX experts, but read the documentation, too. If gcc can't find the libraries automatically, it is easy---no, **very** easy---to insert the appropriate OS-dependent directives in your Jamfile. I have to say that the difficulty in initially setting up Boost Build v2 makes it appear to be an "experts-only" tool, but in fact it is in many ways a great tool for non-experts like me. It has and hides a lot of "implementation details" of how to compile and link software on different platforms. Even if you compile on only one platform (like Windows), it's easier to use than any alternative I know of (because you don't even have to know about vcvars.bat or set any environment variables). I now use the Visual Studio IDE only for debugging; bjam is **much** easier to use than even the IDE. And I've been able to compile and link my software on Windows, Linux, Solaris, and MacOS X using the exact same set of files, including the exact same Jamfiles, by just typing "bjam" each time. Try doing that with Makefiles (just figuring out the right linker command and options is a complete nightmare).

Deane Yang wrote:
Daryle Walker wrote:
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).
"sh ./build.sh --update clean" should work. Or if you already have a bjam compiled "bjam -f build.jam --toolset=darwin clean".
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.
This is a good question that I'll leave to the experts.
"sh ./build.sh --update" is just for that, it's meant as a development option so that during changing and testing the bjam code it doesn't go rebuilding all the time.
In particular, is it a bad idea to have a Jamfile or Jamfile.v2 (or both) in the jam_src directory that includes a clean target? This would allow you to rebuild using bjam itself.
Yes it's a bad idea, as it just gives the wrong impression of what can be done, and it's just more files. And of course you can do the incremental build already as above :-) -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Another quick comment: I recommend trying to ignore all the discussion about environment variables. I've been able to compile bjam and install Boost Build V2 without setting any environment variables. This makes it much easier to transfer your build environment to other computers and other OS's.

Daryle Walker wrote:
(That's one line, BTW.) Now I get a different result when I run "bjam" from my home directory:
//======================================================================== error: Boost.Jam version 3.1.12 or later required
Aha! Great news! Now that you've managed to have bjam to find your build system, this one looks easy... Boost.Build v2 from CVS is still a bit of a moving target, requiring that you recompile bjam at times. Right now the latest precompiled version of bjam is v 3.1.11, which should work fine with the build system from Boost 1.33. ... double-checking ... ok! You can either edit your boost-build.jam or BOOST_BUILD_PATH to point at Boost 1.33 or recompile bjam. You'll find instructions for the latter at <http://tinyurl.com/dj9tt>, hopefully it can be as simple as > cd $BOOST_ROOT/tools/build/jam_src/ > ./build.sh gcc (for the record, there's also a build.bat for windows; the link above contains a list of additional toolsets you may use with each script) A fresh version of bjam will emerge in bin.<platform> (for me it reads bin.linuxx86). Copy the newly built bjam over the previous version and you should be all set. [snip]
At least I'm closer than before....
I think you are ;-) Best regards, João
participants (4)
-
Daryle Walker
-
Deane Yang
-
João Abecasis
-
Rene Rivera