Building boost on linux

A valid gcc toolchain is required.

Build or obtain the bjam build tool e.g. using a package manager.

Image

Download the boost sources (http://www.boost.org/) and extract them into a folder e.g. /developer/src/boost in the following refered as $SOURCES. Copy the bjam build tool from /usr/bin/ into the $SOURCES folder.

Modify the configuration files as needed. For instance, the $SOURCES/bootstrap.sh file to the following. Make sure you have write permissions to the lib folder.

TOOLSET=”gcc”

LIBDIR=/usr/local/lib/boost

Mark the $SOURCES/bootstrap.sh and the $SOURCES/tools/build/v2/engine/build.sh as executable.

chmod +x

Otherwise calling the bootstrap.sh leads to a “permission denied” error!

Execute bootstrap.sh … happy compiling – be patient
…failed updating 60 targets…
…skipped 12 targets…
…updated 875 targets…

After that, run ./bjam install. E.G. you can specify the adress model by using address-model=64 for 64 Bit.
…failed updating 60 targets…
…skipped 12 targets…
…updated 9731 targets…

About these ads

About J.T.

Software engineer from Germany
This entry was posted in Common and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s