# Get the tarball
cd
test -f installed/boost_1_86_0.tar.bz2 &&
mv installed/boost_1_86_0.tar.bz2 .
test ! -f boost_1_86_0.tar.bz2 &&
wget https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2
# Verify tarball w/ sha256sum:
# (this works too: cksum -a sha256 --untagged boost_1_86_0.tar.bz2)
# (this works too: shasum -a 256 boost_1_86_0.tar.bz2)
# (this works too: openssl sha256 boost_1_86_0.tar.bz2)
echo "1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d751\
3b boost_1_86_0.tar.bz2" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "boost_*" -exec rm -r {} \;
tar xjvf ~/boost_1_86_0.tar.bz2
cd boost_1_86_0
test $UID = 0 && chown -R root:root .
# If you want everything to go in to /usr/local, leave off --prefix below
# Below we match the location of the Slackware package
# Configure it - 64-bit
test $(uname -m) = 'x86_64' &&
./bootstrap.sh --prefix=/usr --libdir=/usr/lib64
# Configure it - anything else
test $(uname -m) != 'x86_64' &&
./bootstrap.sh --prefix=/usr
# Build it
./b2
# Become root to build and install it
su
# Older versions of this howto (e.g. boost 1.31.0) also installed these
# binaries, remove them if they're there:
( cd /usr/bin ; rm -f jam mkjambase yyacc )
( cd /usr/local/bin ; rm -f jam mkjambase yyacc )
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg boost
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/boost_*.tar.*
mv boost_1_86_0.tar.bz2 installed/
# If you ever want to uninstall Boost, this should do it:
cd
su
for pfx in /usr /usr/local;
do
find ${pfx}/include -maxdepth 1 -type d -name "boost-*"\
-exec rm -r {} \;
test -d ${pfx}/include/boost && rm -r ${pfx}/include/boost
rm -f ${pfx}/lib*/libboost_*
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "boost_*" -exec rm -r {} \;
rm -f ~/installed/boost_*.tar.*