From: Michael D. <mi...@mi...> - 2008-04-21 15:38:59
|
I tried setting those two env variables on my second test. I discovered that there are two more subtle requirements to this approach: a) your "BOOST_ROOT" directory needs to be writable b) the code in your "BOOST_ROOT" directory needs to be built although I suspect b) might not be necessary if the directory is writable I think that having simple ./configure + make to wrap the bjam stuff would make things much easier to use, sort of like what is available for the main boost distribution.. In particular, it could find where you bjam is located, and allow you to set the location of your (source) BOOST_ROOT, or alternatively to specify an "installed" location of the boost libraries. If the latter, it would just write a new Jamroot file that takes an approach similar to Andreas (specify the include locations and libraries we need to link with explicitly). I realize this would all be redundant after it's (hopefully) included in the Boost distro, but in the meantime I think it would make things much easier to use. I can take a stab at this, since I've grown quite familiar with autotools over the past year.. Regarding the unit test libraries, these seem to be built and included in the distro by default on most platforms anyway. Plus, since cpp- netlib is taking a headers-only approach, the unit tests are the only thing someone can build. So it seems like a reasonable requirement that you can't "build" cpp-netlib without having the unit test library to link with. Take care, -Mike On Apr 20, 2008, at 11:24 PM, Dean Michael C. Berris wrote: > Hi Mike! > > So here are the environment variables you need to set up: > > BOOST_ROOT=/path/to/boost/distribution/root > BOOST_BUILD_PATH=/path/to/boost/build/root > > So in your setup, you might have Boost.Build in /usr/share/boost_build > and have your Boost distribution root at /usr/local/boost_1_35_0. My > suggestion is to use the Boost.Build inside the > $(BOOST_ROOT)/tools/build/v2 directory. > > So you'd do something like: > > export BOOST_ROOT=/usr/local/boost_1_35_0 > export BOOST_BUILD_PATH=$(BOOST_ROOT)/tools/build/v2 > > What you need to build the tests inside libs/cpp-netlib/test/ -- in > that > directory, run 'bjam'. > > That should get you working just fine. If you still encounter > problems, > then just let me know so that I look into it myself. :) > > PS. We ought to have a ./configure script which should find where the > BOOST_ROOT is if it's not set in the environment path. However, I > think > that's more of an afterthough given that we're only just a handful of > developers working on this project. > > PPS. And the reason why we need the whole Boost distribution is > because > we require the Boost.Test libs to be built and linked from source. We > *can* change the Jamfile inside the test directory to not require > "<source>/boost//unit_test_framework" but that would require the > Boost.Test libs be installed in the system -- which I don't really > want > to require. So the safest bet for now is to have the whole Boost > distribution available from somewhere. ;) > > -- > Dean Michael Berris > Software Engineer, Friendster, Inc. > <dmb...@fr...> > +639287291459 > > >> -----Original Message----- >> From: cpp...@li... >> [mailto:cpp...@li...] On >> Behalf Of Michael Dickey >> Sent: Monday, April 21, 2008 4:44 AM >> To: C++ Networking Library Developers Mailing List >> Subject: [cpp-netlib-devel] Bjam woes >> >> Unfortunately, I've been having a very hard time trying to get bjam/ >> Boost.Build setup and working properly.. >> >> First, I find the distinction between "bjam" and "Boost.Build" to be >> very confusing (two separate projects, separate distributions, the >> names are used interchangeably, and you cannot seem to use >> one without >> the other), and the documentation currently available I think >> is quite >> unclear.. I read through the tutorial, installed the bjam >> executable >> in my path, and installed the boost-build distribution >> package in /usr/ >> share/boost-build. I'm able to build the projects in the examples >> directory, but running "bjam" in a cpp-netlib directory gives me: >> >> Jamroot:11: in modules.load >> *** argument error >> * rule use-project ( id : where ) >> * called with: ( /boost : ) >> * missing argument where >> /usr/share/boost-build/build/project.jam:956:see definition of rule >> 'use-project' being called >> /usr/share/boost-build/build/project.jam:312: in load-jamfile >> /usr/share/boost-build/build/project.jam:68: in load >> /usr/share/boost-build/build/project.jam:170: in project.find >> /usr/share/boost-build/build-system.jam:248: in load >> /usr/share/boost-build/kernel/modules.jam:261: in import >> /usr/share/boost-build/kernel/bootstrap.jam:132: in boost-build >> /usr/share/boost-build/boost-build.jam:1: in module scope >> >> My guess is that this means bjam &| Boost.Build cannot find >> the boost >> libraries? Interestingly enough, I can find no place in the >> tutorial >> or elsewhere in the documentation where it talks about setting this >> up, only the setup for your compiler. >> >> I found some talk about having to set a BOOST_ROOT variable via >> google, so I tried pointing this to a directory containing the boost >> 1.35.0 distro. Unfortunately, this just gives me a whole >> other set of >> errors. Plus, it would make little sense to me if having a source >> distribution is required.. >> >> mdickey@terra cpp-netlib]$ export >> BOOST_ROOT=/share/home/mdickey/code/ >> boost_1_35_0 >> [mdickey@terra cpp-netlib]$ bjam >> warning: Graph library does not contain optional GraphML reader. >> note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH >> to the >> note: directories containing the Expat headers and libraries, >> respectively. >> warning: skipping optional Message Passing Interface (MPI) library. >> note: to enable MPI support, add "using mpi ;" to user-config.jam. >> note: to suppress this message, pass "--without-mpi" to bjam. >> note: otherwise, you can safely ignore this message. >> Building Boost.Regex with the optional Unicode/ICU support disabled. >> Please refer to the Boost.Regex documentation for more information >> (don't panic: this is a strictly optional feature). >> /usr/share/boost-build/build/virtual-target.jam:423: in _adjust-name >> from module object(file-target)@558 >> ... >> >> Oh my! I know the autotools stuff can be a bit of a dinosaur/pain, >> but the good ole "./configure; make" seems a lot more >> friendly to me! =) >> >> There must be some simple way to say "Boost is installed in /usr/ >> local/". I thought about re-writing the Jamroot file to set >> everything up manually as a project, but I'm sure it can't be that >> difficult... There must be something silly and trivial that I am >> missing here.. >> >> Thanks for any help, >> -Mike >> >> >> -------------------------------------------------------------- >> ----------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to >> save $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java >> .sun.com/javaone >> _______________________________________________ >> Cpp-netlib-devel mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > |