Boost logo

Boost-Build :

Subject: [Boost-build] trying to compile a test project with boost.build which uses boost libraries
From: Geoff Hilton (geoff.hilton_at_[hidden])
Date: 2009-02-25 20:46:39


Hi,

I'm trying boost.build out under Linux, I compiled bjam and followed
the instructions to the letter, details below. I can compile with
boost/shared_ptr.hpp no problem, but when I add in boost.filesystem I
get all sorts of errors (below), why is it trying to use
$BOOST_ROOT/bin.v2 ? I deleted that folder once the boost compilation
was done and put stage's lib folder into $BOOST_ROOT (I think.., heh).

Thanks,
Geoff

geoff_at_venus:~/testmake$ bjam clean && bjam release
...found 1 target...
...updating 1 target...
common.Clean clean
...updated 1 target...
...patience...
...found 443 targets...
...updating 20 targets...
common.mkdir /usr/local/boost_1_38_0/bin.v2
mkdir: cannot create directory `/usr/local/boost_1_38_0/bin.v2':
Permission denied

         mkdir -p "/usr/local/boost_1_38_0/bin.v2"

...failed common.mkdir /usr/local/boost_1_38_0/bin.v2...
...skipped /usr/local/boost_1_38_0/bin.v2/libs for lack of
/usr/local/boost_1_38_0/bin.v2...
...skipped /usr/local/boost_1_38_0/bin.v2/libs/filesystem for lack of
/usr/local/boost_1_38_0/bin.v2/libs...
...skipped /usr/local/boost_1_38_0/bin.v2/libs/filesystem/build for lack
of /usr/local/boost_1_38_0/bin.v2/libs/filesystem...
...skipped
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4 for lack
of /usr/local/boost_1_38_0/bin.v2/libs/filesystem/build...
...skipped
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4...
...skipped
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi>operations.o
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi>path.o
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi>portability.o
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi>utf8_codecvt_facet.o
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi...
...skipped /usr/local/boost_1_38_0/bin.v2/libs/system for lack of
/usr/local/boost_1_38_0/bin.v2/libs...
...skipped /usr/local/boost_1_38_0/bin.v2/libs/system/build for lack of
/usr/local/boost_1_38_0/bin.v2/libs/system...
...skipped /usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4
for lack of /usr/local/boost_1_38_0/bin.v2/libs/system/build...
...skipped
/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release for
lack of /usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4...
...skipped
/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release/threading-multi
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release/threading-multi>error_code.o
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release/threading-multi...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release/threading-multi>libboost_system-gcc42-mt-1_38.so.1.38.0
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/system/build/gcc-4.2.4/release/threading-multi...
...skipped
<p/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi>libboost_filesystem-gcc42-mt-1_38.so.1.38.0
for lack of
/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi...
...skipped <pbin/gcc-4.2.4/release/threading-multi>testmake for lack of
<p/usr/local/boost_1_38_0/bin.v2/libs/filesystem/build/gcc-4.2.4/release/threading-multi>libboost_filesystem-gcc42-mt-1_38.so.1.38.0...
...failed updating 1 target...
...skipped 19 targets...

my relevent environment variables:

$BOOST_ROOT = /usr/local/boost_1_38_0
$BOOST_BUILD_PATH = /usr/share/boost-build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BOOST_ROOT}/lib (the compiled boost
binaries are also in /usr/local/lib at the moment though.. which one
should they be in?)

/usr/share/boost-build/user-config.jam :

#[...]
using gcc ;
#[...]

--jamroot.jam--

project
   : requirements <include>/usr/local/boost_1_38_0 <threading>multi
<library>/boost//filesystem
   ;
use-project boost : /usr/local/boost_1_38_0 ;
exe testmake :
  testmake.cpp /boost//filesystem /boost//system ;

---testmake.cpp---

#include "testmake.hpp"
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
#include <iostream>

//namespace fs = boost::filesystem;

int main(int argc, char* argv[])
{
   //if (argc < 1) {
     std::cout << "Hello world." << std::endl;
     boost::shared_ptr<int> intPtr;
   //}
   //else if (argc >= 1) {
   // for (int i = 0; i < argc; ++i) {
   // fs::path file = fs::path(argv[i]);
   // std::cout << file.native_file_string();
   // if (fs::exists(file)) {
   // std::cout << " exists.";
   // } else {
   // std::cout << " doesn't exist.";
   // }
   // std::cout << std::endl;
   // }
   //}
   return 0;
}


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk