Build Boost for FreeBSD rev0.1.2

Prepare ZFS for Building Boost

Make zfs fs directories for building software (boost).

$ doas zfs create -o mountpoint=/build zroot/build
$ doas zfs create -o mountpoint=/build/boost-1.78 zroot/build/boost-1.78
$ doas chown -R YourLoginName:YourLoginName /build

Q: Why create a /build fs for building software?

A: After building software, we might want to keep all of the building files for future use, such as boost.

Q: Why create a /build/boost fs for building boost software?

A: Boost software is not a small project which contains many files. If we want to delete all of them one day, it will take lots of time to wait. Making a zfs fs will let it be removed within a second:

$ zfs destroy -f zroot/build/boost-1.78

zfs destroy is a super fast command to remove the fs including the underlying files.

Download Boost

Download boost software from official website:

(Take boost 1.78.0 for example)

$ fetch

Extract Boost:

$ tar -jxvf boost_1_78_0.tar.bz2 -C /build/boost-1.78

Build Boost

Start Building Boost:

$ cd /build/boost-1.78/boost_1_78_0/
$ ./
$ ./b2 --prefix=/sandbox

Install Boost

$ doas ./b2 --prefix=/sandbox install


Last revised: January 01, 2022 at 03:54:59 GMT