[Pdns-users] compiling pdns-recursor on Mac OS X 10.6.2 Snow Leopard (with lua!)

Chet Nichols III chet.nichols at gmail.com
Wed Nov 25 09:55:26 UTC 2009


hey folks-

i just wanted to drop a note that i was able to successfully compile the
powerdns recursor on Mac OS X 10.6.2 (Snow Leopard), lua scripting enabled,
with relative ease. i didnt see anything in my mail archives about this, so
im not sure if anyone has done it yet. so, for the curious, my steps were
(this all assumes you have the OS X Developer Tools installed):

1) get boost:
--------------
downloaded the boost_1_41_0.tar.gz source from
http://sourceforge.net/projects/boost/files/boost/1.41.0/ and uncompressed
to /Users/chet/boost_1_41_0

2) get lua:
-----------
downloaded the latest lua (5.1.4 as of today) from
http://www.lua.org/ftp/lua-5.1.4.tar.gz and uncompressed to
/Users/chet/lua-5.1.4

3) compile lua:
-----------------
jumped into my uncompressed lua-5.1.4 directory, then ran:
$ sudo make macosx install

(that was easy)

so, now that are prereqs are satisfied, lets compile the pdns-recursor:

4) download the latest (as of today) from
http://downloads.powerdns.com/releases/pdns-recursor-3.1.7.1.tar.bz2 and
uncompress it.

5) now, from within our uncompressed pdns-recursor-3.1.7.1 directory, run
configure:

$ CXXFLAGS=-I/Users/chet/boost_1_41_0/ LUA=1 ./configure

6) now, modify the pdns-recursor Makefile to set the LUA include/lib flags:

LUA_CPPFLAGS_CONFIG ?= -I/usr/local/include
LUA_LIBS_CONFIG ?= -L/usr/local/lib -llua

(note: depending on if you did any custom modifications to the lua Makefile
itself, you may have different include and lib directories)

6a) additionally, you can change the pdns-recursor Makefile to specify
different bin/sbin/config install paths. i did this:

SBINDIR=/usr/local/pdns/sbin/
BINDIR=/usr/local/pdns/bin/
CONFIGDIR=/usr/local/pdns/etc/

7) now, lets make!

$ CXXFLAGS=-I/Users/chet/boost_1_41_0/ LUA=1 make

8) assuming all goes well, you should see a bunch of compile lines, and it
should complete without any errors. at this point, install!

$ sudo make install

ta da! and now if you go into /usr/local/pdns, you'll see your bin, sbin,
and etc dirs. etc/recursor.conf-dist will probably end up being renamed to
recursor.conf, but thats up to you, of course.

as for lua, just set a lua script path with in your recursor.conf and have
fun!

if anyone has any issues or comments, let me know. most of it is pretty
self-explanatory and already documented, but it took some twiddling with the
LUA flags in the pdns-recursor Makefile to get it to compile.

enjoy!

chet

-- 
----------------------------------------
chet nichols III
chet.nichols at gmail.com
aim: chet / twitter: chet
http://chetnichols.org
----------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20091125/b96edc54/attachment.html>


More information about the Pdns-users mailing list