Getting the latest PowerDNS sources to work on

Most users are well served by our precompiled packages, or those shipped by the Linux/Unix? distribution, and others can compile from the source tarballs available on the downloads page.

However, to get really involved in PowerDNS development, or to test the latest features, you need to be able to build from the Subversion repository, or apply patches suggested by PowerDNS developers.

The descriptions below are intended for developers or for advanced users willing to experiment!


 is the Git repository


Regularly, snapshots are made available. Check them out on

Applying patches to released versions

To apply a patch, get the clean PowerDNS sources the patch is against. This will generally be the latest version released, as found on the download page.

Patches are generally against a certain directory, so look at the first lines, which look something like this:

Index: dnspacket.hh
--- dnspacket.hh        (revision 456)
+++ dnspacket.hh        (working copy)
@@ -297,12 +297,15 @@

Here we see no directory, so we need to go to the directory containing dnspacket.hh and run:

$ patch -p0 < the-patch

The -p0 bit means "don't strip any paths from the filenames". If the patch had looked like this:

Index: dnspacket.hh
--- pdns/dnspacket.hh        (revision 456)
+++ pdns/dnspacket.hh        (working copy)
@@ -297,12 +297,15 @@

We would have had two choices: use patch -p1 in the directory containing dnspacket.hh, or change to the parent directory, and use patch -p0.

Building from Subversion

To retrieve the latest version, do:

$ svn co svn:// pdns
A  pdns/debian
A  pdns/debian/control
A  pdns/debian/pdns.postinst

This will generate a directory called pdns, containing the very latest version of our sources.

Building the recursor from Subversion

This is pretty easy, enter the pdns directory and run './dist-recursor'. This generates a directory called pdns-recursor-x.y.z, where x, y and z are version dependent. Enter this directory, and run 'make'.

Building the Authoritative Server from Subversion

For technical reasons an additional step called 'bootstrapping' is needed before you can compile. In order for this to work you need to have installed:

  • autoconf 2.59
  • automake 1.6 or 1.9.4
  • libtool 1.5.6
  • pkg-config

On linux you then run the below, on FreeBSD replace ./bootstrap by ./bootstrap.freebsd:

$ autoreconf -i
$ ./bootstrap
Please ignore this warning when you see it:
warning: AC_TRY_RUN called without default to allow cross compiling

/usr/share/aclocal/sigc++.m4:8: warning: underquoted definition of AM_PATH_SIGC
  run info '(automake)Extending aclocal'
  or see
/usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES
/usr/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK
/usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/share/aclocal/aalib.m4:12: warning: underquoted definition of AM_PATH_AALIB

Afterwards you can run ./configure as usual and build as if from a source tarball.

Required packages for building on …

Debian lenny

aptitude install build-essential asciidoc xmlto zip subversion libboost1.40-all-dev bison flex ragel pkg-config libtolua++5.1-dev

Note: you must enable for libboost1.40-all-dev.