Compiling PowerDNS on OSX 10.5.7

Want to play with PowerDNS? On a Mac? You’ll need to do something like this. Make sure you read all the way to the end before continuing.

1. Download boost from sourceforge. The link for the version I used, 1.39.0, is here.

2. Extract the file somewhere. Mine was just in downloads.

3. Download and extract the source (at the top) of PowerDNS. I used version 2.9.22, from here.

4. navigate to the PowerDNS directory and execute the following commands. Change the reference to MySQL to something relevant to your local copy:

$ CXXFLAGS=-I/Users/sho/Downloads/boost_1_39_0 ./configure --with-mysql-includes=/usr/local/mysql-5.0.45-osx10.4-i686/include
$ make
$ sudo make install

That’s it! Built and installed perfectly. Now run pdns_server, and watch it fail with Cannot create semaphore: Function not implemented, because OSX is not fully POSIX compliant. Now wasn’t that a great way to waste time? I certainly thought so. Told you to read all the way to the end.

Tags: ,

One Response to “Compiling PowerDNS on OSX 10.5.7”

  1. QdK Says:

    Try export CXXFLAGS=”$CXXFLAGS -DDARWIN” and the same for CFLAGS (in case it’s used somewhere), then ./configure again. In unix_semaphore.cc , an #if DARWIN block has the correct code, but DARWIN isn’t defined by autohell. Forcing the option in CXXFLAGS should include the correct code and pdns_server works like it should (works for me, anyway)

Leave a Reply

You may edit your comment for up to 30 minutes after submission.