Skip to content

Compile boost on CentOS 7

Tested with boost 1.83.0

Requirements

Download source

You can download source code from this GitHub But be carreful, don't download the 'source code' but the 'realeased', because .tar.gz or zip source code doesn't contains tools to compile boost.

If the folder inside the downloaded archive is called boost-boost-<version> you got the wrong one. So download the released source code, and you normally should have a folder called boost-<version>, with a full filled tools folder.

Bootstrap

bash
cd <SOURCE_DIR>
./bootstrap.sh --prefix=<SOURCE_DIR>/build --with-toolset=gcc

This will generate a b2 executable in the source directory.

Compile

bash
./b2 install --prefix=<SOURCE_DIR>/install

References