wiki:SystemNotesFreeBSD

This system notes describe a process to build Kea on FreeBSD 10.3. I'll first describe the process for "normal" users who only need to install and use a release version of Kea; for developers who need to build (and possibly modify) a development version, I'll add specific process and notes at the end of this memo.

This page explains how to compile Kea from sources. FreeBSD provides packages for Kea. The package is called net/kea. For details, see Install Kea from packages on this wiki page: wiki:Install#InstallKeafrompackages.

0. Install necessary tools.

Kea depends on several external packages, so you need the standard package system. The handbook suggests to run first $ pkg audit -F which checks for known vulnerabilities in installed packages and install the package system if it was not.

1. Install necessary dependencies.

We need to install automake, autoconf (which is an automake dependency), autoreconf (which is an autoconf dependency), libtool, pkg-config (pkgconf package). boost (boost-all meta package) and log4cplus.

$ pkg install automake
$ pkg install libtool
$ pkg install pkgconf
$ pkg install log4cplus

Boost is required too: you have the choice to install the boost-all package which is old,

$ pkg install boost-all

or to download the distribution of a recent version of boost and use its header files so it is enough to extract the archive.

You need a crypto backend, i.e., either Botan or OpenSSL. If you choose Botan we need to install it (currently the version 1.10 is available):

$ pkg install botan110

git is not strictly necessary (you can use a distrib in a gzipped tar file) but highly recommended:

$ pkg install git

And if you'd like to run unit tests:

$ pkg install googletest

2. Optional dependencies.

You can believe you need python3 even it is no longer used by Kea:

$ pkg install python3

For generating parsers flex is included but bison version 3 is required for Kea and is not available as a package or a port. So you have to compile and install by yourself if you really want to generate parser files (currently from src/lib/eval/parse.yy only).

For generating documentation you need docbook-xsl, libxslt (for xsltproc), elinks and doxygen (which brings many x11, graphic, latex and other packages with it):

$ pkg install docbook-xsl
$ pkg install libxslt
$ pkg install elinks
$ pkg install doxygen

3. Download, build, and install Kea.

The following steps are necessary to download sources and install Kea:

$ git clone https://github.com/isc-projects/kea.git
$ cd kea
$ autoreconf -if
$ ./configure --prefix=/usr/local --with-gtest --with-boost-libs=-lboost_system --with-boost-lib-dir=/usr/local/lib --without-werror
$ make

and as root:

# make install

The boot library configure arguments are not required (configure will detect they are needed and add them). With an old version of boost (including from the current package) you can get some errors from boost includes. In this case warnings should not be converted into errors:

With a recent (e.g., 1.61.0) version of boost the configure command becomes:

$ ./configure --prefix=/usr/local --with-gtest --with-boost-include=<xxx>/boost_1_61_0

Note the unused -pthread warnings are not fatal and can be safely ignored.

4. Database Backends.

The extract versions of backends can vary, please look for the current best available packages, e.g.:

$ pkg search mysql

For MySQL:

$ pkg install mysql56-client
$ pkg install mysql56-server

and

$ ./configure ... --with-dhcp-mysql=/usr/local/bin/mysql_config

For PostgreSQL:

$ pkg install postgresql95-client
$ pkg install postgresql95-server

and

$ ./configure ... --with-dhcp-pgsql=/usr/local/bin/pg_config
Last modified 17 months ago Last modified on Jul 3, 2016, 1:13:44 AM