Compiling queryperf on Mac OS X Leopard

Marc Majka majka at
Fri May 30 17:11:37 UTC 2008

The BIND 9 headers are in /usr/include, so your don't really need to  
do anything to use them.  The library is in /usr/lib/libresolv.dylib,  
so you need to link with -lresolv.  However, the problem you are  
running into is the fact that querypref wants constants like PACKETSZ,  
and C_IN.  These don't exist in BIND 9.

I don't know if queryperf has been updated to use BIND 9, but in  
looking around on FreeBSD and FreshPorts, I see that queryperf has  
been replaced by dnsperf and resperf, which are based on BIND 9.  I  
just downloaded dnsperf and resperf from 
  and built them  effortlessly using "configure" and "make" on a  
Leopard 10.5.3 system.  Take a look at the dnsperf and resperf man  
pages and see if they do what you need.  You may be able to leave  
queryperf and the BIND 8 headers in the last century!  :-)

-- Marc

On 30 May, 2008, at 09:15, Merul Patel wrote:

> Sill question, Marc, but what's the correct option to specify to use  
> the BIND 9 headers?
> On 30 May 2008, at 17:08, Marc Majka wrote:
>> BIND 8 compatibility has been deprecated in Mac OS X, and will  
>> probably disappear very soon.  You are much better off using the  
>> BIND 9 headers.
>> --
>> Marc Majka
>> On 30 May, 2008, at 06:02, Merul Patel wrote:
>>>> On 30 May 2008, at 11:29, Merul Patel wrote:
>>>>> Hi,
>>>>> BIND9 seems to build fine on my Mac OS X 10.5.3 box, but I'm  
>>>>> unable
>>>>> to
>>>>> build queryperf, and there's little in the README to assist. The
>>>>> utility compiles fine on Debian Etch, so it's clearly something  
>>>>> that
>>>>> the configure script is/isn't picking up about the Mac box.
>>>> IIRC queryperf requires bind 8 compatibility.
>>>> cd bind-9.5.0/contrib/queryperf
>>>> ./configure
>>>> # Edit the Makefile and alter the DEFS line to look like

More information about the bind-users mailing list