wiki:SystemNotesMacOSX109

This system notes describe a process to build Kea on MacOS X 10.9 (Mavericks). 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.

0. Install necessary tools.

Unless this is your first time to build an application on OS X by hand, it's quite likely that you've already done (something like) this process. But I'm briefly summarizing this phase just in case.

Kea depends on several external packages, and you'll need to install a packaging system for OS X in addition to Xcode. I've been using HomeBrew for quite some time, and this page assumes HomeBrew as the packaging system.

  • Install Xcode Command Line Tools. The specific procedure may differ based on the version of Xcode available at the time of your installation. In my case (version 5.1) the system asked whether I want to install command line tools when the first compilation was attempted. It is also possible to install Xcode from App Store (it's free), invoke it, and install Command Line Tools from its "Downloads" preference panel.
  • (Make sure you have write permission on and under /usr/local; Otherwise there will be various troubles with HomeBrew)
  • Install HomeBrew as shown in its top web page:
    $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
    

1. Install necessary dependencies.

All of the required dependencies are available in HomeBrew packages, so their installation is easy. This is basically a copy-and-paste-and-run process:

$ brew install automake autoconf libtool pkg-config
$ brew install python3
$ brew install boost
$ brew install botan
$ brew install log4cplus

Notes:

  • Kea is in the process of removal of Python3 framework, so the python3 installation will soon no longer be necessary.

2. Building Documentation.

It is not necessary to build the documentation when you build the code. If you do with to build the documentation you will need to install some extra packages.

$ brew install docbook-xsl
$ brew install elinks
$ brew install doxygen

You may also need to export XML_CATALOG_FILES as per the instructions from installing those two packages.

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=/opt/kea
$ make
$ sudo make install

The installation prefix doesn't have to be /opt/kea; it's just an example. Also, depending on where to install it and whether you have write permission in the install destination, you may or may not need sudo at the final step.

4. For Developers

Build/Install dependencies for developers

To build Kea on a cloned git repository, you'll need some other external packages. They can be installed via HomeBrew:

% brew install automake
% brew install libtool

In addition, as a developer you'd also need to make googletest available. This is not absolutely necessary if you only need to build BIND 10, but for serious development it's crucial. It cannot be "installed" via HomeBrew anymore; you need to fetch a source archive and extract it by hand:

% curl -o gtest-1.7.0.zip  http://googletest.googlecode.com/files/gtest-1.7.0.zip
% unzip gtest-1.7.0.zip

Where to extract it doesn't matter. For specific examples below, we assume it's extracted under /opt/src. Note also that there is no need to build it (i.e., no need to do ./configure or make); just extracting the archive is sufficient.

$ git clone https://github.com/isc-projects/kea.git
$ cd kea
$ autoreconf -i
$ ./configure --prefix=/opt/kea --with-gtest-source=/opt/src/gtest/gtest-1.7.0
$ make

Run tests

When build is completed, you can run unit tests as follows:

% make check
Last modified 2 years ago Last modified on Nov 30, 2015, 4:39:14 PM