Boost logo

Boost Interest :

Subject: [Boost-cmake] First time build of boost-1.40.0 with cmake
From: John Murdie (john_at_[hidden])
Date: 2009-09-17 10:34:17


I'm trying for the first time to build boost 1.40.0 from source with
cmake. This on a Slackware Linux system which requires an 64-bit
installation of boost in addition to an earlier-made 32-bit one (version
1.35.0). I've been unable to find any tutorial information, and so have
had to deduce what to do.

I had to add cmake-2.6.4 as a prerequisite, then commanded:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/boost-1.40.0-x86_64-1
-DPYTHON_INCLUDE_PATH=/usr/include64/python2.5 .
$ make
$ make modularize -- need for this discovered in reply on a mailing list
$ make install
...

(If I don't specify the 64-bit Python include directory, the build picks
up the usual 32-bit /usr/include/python2.5 and problems result.)

All goes just great until well (97%) into the 'make install', when it
appears that the install part of the build (as I have configured it?) is
missing necessary include (.hpp) files:

...
Scanning dependencies of target inspect
[ 97%] Building CXX object tools/inspect/CMakeFiles/inspect.dir/inspect.cpp.o
In file included from /local/d0p3/john/boost_1_40_0/tools/inspect/inspect.cpp:28:
/local/d0p3/john/boost_1_40_0/tools/inspect/time_string.hpp:19:44: error: boost/config/warning_disable.hpp: No such file or directory
make[2]: *** [tools/inspect/CMakeFiles/inspect.dir/inspect.cpp.o] Error 1
make[1]: *** [tools/inspect/CMakeFiles/inspect.dir/all] Error 2
make: *** [all] Error 2
bash-3.1$

I'd link all .hpp files I could find to /usr/local/include64/boost/*/
(as appropriate) and add:

-DRELEASE_COMPILE_FLAGS="-O3 -DNDEBUG -I/usr/local/include64"

to the cmake arguments, but there must be an easier way of preventing
this problem, surely?

John A. Murdie


Boost-cmake 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