Building Boost

Boost is used in the NodeBox graph library. Here are the instructions for building it. Note that Boost and its bindings are already included in the NodeBox? Graph library; these instructions are for people who want to roll their own from scratch.

Getting Boost and BJam

Sourceforge.

Download both the boost and bjam package.

Building BJam

Official guide

Boost uses its own make variant, called BJam. It's simple enough to compile:

cd boost-jam-3.1.16
sh ./build.sh
sudo mkdir -p /usr/local/bin
sudo cp bin.macosxx86/bjam /usr/local/bin

Building Boost

Official guide

cd boost_1_34_1/
bjam stage
  1. Set the python version and python root environment variables:
    export PYTHON_VERSION=2.3
    export PYTHON_ROOT=/System/Library/Frameworks/Python.framework/Versions/2.3
    
    Alternatively, some systems may have the following path (without a System folder):
    export PYTHON_VERSION=2.3
    export PYTHON_ROOT=/Library/Frameworks/Python.framework/Versions/2.3
    
  2. Compile Boost:
    bjam stage
    
  3. All the boost libraries are now in the stage folder.

Compiling the Boost Graph Library (BGL) Python bindings

  1. Download the http://www.osl.iu.edu/~dgregor/bgl-python/.
  2. Extract (I use /Users/fdb/Python/bgl-python).
  3. Open the Terminal an cd into the source folder:
    cd /Users/fdb/Python/bgl-python
    
  4. Set the environment variables:
    export BOOST_ROOT=/Users/fdb/Source/boost
    
  5. Build the bindings:
    bjam stage
    
  6. All the required files are now in the python folder.

Note: For scripts, you sometimes need to put the libboost_python.dylib in the same folder as your Python script.