Building the Boost library for your Raspberry Pi

To build the Boost library for your Raspberry Pi:

  1. Enter the following commands:

    cd $BASEDIR/boost_1_64_0/tools/build
    ./bootstrap.sh
    ./b2 install --prefix=$BASEDIR/boost.build
    export PATH=$BASEDIR/boost.build/bin:$PATH
    
  2. Create a project-config.jam file by copying the user-config.jam file. To copy the user-config.jam file, enter the following command:

    cp $BASEDIR/boost_1_64_0/tools/build/example/user-config.jam $BASEDIR/boost_1_64_0/project-config.jam
  3. Go to the $BASEDIR/boost_1_64_0/ directory and open the project-config.jam file in a text editor. In the GCC Configuration section, add the following line:

    using gcc : arm : arm-linux-gnueabihf-g++ ;
  4. Save the project-config.jam file in the $BASEDIR/boost_1_64_0/ directory.

  5. To complete the build, enter the following commands:

    cd $BASEDIR/boost_1_64_0
    b2 --build-dir=$BASEDIR/boost_1_64_0/build toolset=gcc-arm link=static cxxflags=-fPIC --with- 
    filesystem --with-test --with-log --with-program_options install --prefix=$BASEDIR/boost
    1. Arm estimates that your virtual machine will take approximately 15 minutes to execute these commands.

Previous Next