This system notes describe a process to build Kea on OpenBSD 5.9. 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. OpenBSD 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. If it was not yet configured get the example pkg.conf and edit it:

$ cp -i /etc/examples/pkg.conf /etc/pkg.conf
$ vi pkg.conf

and uncomment you preferred mirror.

1. Install necessary dependencies.

We need to install automake, autoconf (which is an automake dependency), autoreconf (which is an autoconf dependency), libtool (even there is a system libtool command), boost and log4cplus. In choices install the last version (1.15 for automake, 2.69 for autoconf, etc). Note the automake and autoconf versions for later.

$ pkg_add -v automake
$ pkg_add -v libtool
$ pkg_add -v boost
$ pkg_add -v log4cplus

You need a crypto backend, i.e., either Botan or OpenSSL. If you choose Botan we need to install it:

$ pkg_add -v botan

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

$ pkg_add -v git

And if you'd like to run unit tests:

$ pkg_add -v gtest

2. Optional dependencies.

You can believe you need python3 even it is no longer used by Kea (version 3.5.1 is currently available):

$ pkg_add -v python-3

For generating parsers flex is included, bison is available with a version 3:

$ pkg_add -v bison

For generating documentation you need docbook, docbook-xsl (with its dependency libxslt (or xsltproc), elinks and doxygen:

$ pkg_add -v docbook
$ pkg_add -v docbook-xsl
$ pkg_add -v elinks
$ pkg_add -v doxygen

3. Download, build, and install Kea.

Before using automake, autoconf or autoreconf you must have in your environment AUTOCONF_VERSION and AUTOMAKE_VERSION. The best is to set them in your shell initialisation file. If you don't know:

$ export AUTOCONF_VERSION=2.69
$ export AUTOMAKE_VERSION=1.15

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

$ git clone
$ 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

Note configure fails to detect boost include only does not compile so the two boost library arguments are needed.

Note there are a lot of spurious warnings which are ignored.

4. Database Backends.

For MySQL (in fact MariaDB which is a MySQL fork):

$ pkg_add -v mariadb-client
$ pkg_add -v mariadb-server


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

If you want to run the unit tests you have to give grant SUPER privilege to keatest. This command for root mysql worked for me:

GRANT ALL PRIVILEGES ON  *.* to 'keatest'@'localhost' WITH GRANT OPTION;

For PostgreSQL:

$ pkg_add -v postgresql-client
$ pkg_add -v postgresql-server


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