Compiling boost 1.46.0

#See https://adrhc.go.ro/wordpress/common-commands-when-building/ for building environment, x.sh script and other things not defined here.
#Before starting do declare the environment variables specified to the link above.

NEW_BUILD_NAME=boost
NEW_BUILD_VER=1.46.0
NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER
ls -l /tmp/$NEW_BUILD_NAME-*
ls -l ~/ffp_0.7_armv5/packages/$NEW_BUILD_NAME-*
NEW_BUILD_NR=0

cd ~/compile
wget http://sourceforge.net/projects/boost/files/boost/1.46.0/boost_1_46_0.tar.gz/download
tar xvzf boost_1_46_0.tar.gz
cd ~/compile/boost_1_46_0
~/x.sh ffpg

ERROR
	Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS
SOLUTION
	cd ~/compile/boost_1_46_0
	wget https://svn.boost.org/trac/boost/raw-attachment/ticket/6165/libstdcpp3.hpp.patch
	patch -p0 -i libstdcpp3.hpp.patch

#for compilation with mpi do:
echo "using mpi ;" >> tools/build/v2/user-config.jam
wget https://svn.boost.org/trac/boost/raw-attachment/ticket/6165/libstdcpp3.hpp.patch
patch -p0 -i libstdcpp3.hpp.patch

./bootstrap.sh

rm -r $HOME/temp/$NEW_BUILD_NAME_AND_VER
#compilation with mpi
#requires http://www.mpich.org/static/downloads/3.1.4/mpich-3.1.4.tar.gz
#or http://www.open-mpi.org/software/ompi/v1.8/
nohup ./bjam --prefix=$HOME/temp/boost-$NEW_BUILD_VER/ffp variant=release install &
#or compile it without mpi:
nohup ./bjam --prefix=$HOME/temp/boost-$NEW_BUILD_VER/ffp --without-mpi variant=release install &

cd $HOME/temp/$NEW_BUILD_NAME_AND_VER
makepkg $NEW_BUILD_NAME $NEW_BUILD_VER $NEW_BUILD_NR
cp -v /tmp/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz ~/ffp_0.7_armv5/packages/
funpkg -q $NEW_BUILD_NAME
funpkg -i ~/apache-htdocs/ffp_0.7_armv5/packages/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.