Skip to content

Instantly share code, notes, and snippets.

@macoj
Last active April 3, 2018 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macoj/55b99225509542c78db05c4f42992489 to your computer and use it in GitHub Desktop.
Save macoj/55b99225509542c78db05c4f42992489 to your computer and use it in GitHub Desktop.
the long and winding road to compile boost + graph-tool

create a common directory for zlib and bzip2

mkdir common

build zlib

wget http://downloads.sourceforge.net/project/libpng/zlib/1.2.10/zlib-1.2.10.tar.xz
tar xaf zlib-1.2.10.tar.xz
cd zlib-1.2.10/
./configure
make test
make install prefix=../common

build bzip2

wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar xaf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6/
make -f Makefile-libbz2_so
make test
make install PREFIX=../common
cp -ar libbz2.so.* ../common/lib/

boost time

wget https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2
tar xaf boost_1_66_0.tar.bz2
cd boost_1_66_0/

mkdir boost-build
./bootstrap.sh gcc
b2 -q \
   -d+2 \
   --build-dir=build \
   --stage-dir=stage \
   toolset=gcc \
   link=shared \
   threading=multi \
   variant=release \
   cxxflags="-std=c++11 -O2" \
   -sBZIP2_INCLUDE=../common/include \
   -sBZIP2_LIBPATH=../common/lib \
   -sZLIB_INCLUDE=../common/include \
   -sZLIB_LIBPATH=../common/lib \
   install

then download, compile and install graph-tool, as shown here

https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#manual-compilation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment