Compiling queryperf on Mac OS X Leopard

John Dickinson jad at jadickinson.co.uk
Fri May 30 12:50:49 UTC 2008


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.
>
> ./configure yields:
>
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking for library containing res_mkquery... none required
> checking for library containing __res_mkquery... no
> checking for socket in -lsocket... no
> checking for inet_ntoa in -lnsl... no
> checking for gethostbyname2... yes
> checking for getaddrinfo... yes
> checking for getnameinfo... yes
> checking for socklen_t... yes
> checking for sa_len... yes
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating config.h
> config.status: config.h is unchanged
>
> But then make reports:
>
> gcc  -DHAVE_CONFIG_H -c queryperf.c
> queryperf.c: In function ‘dispatch_query’:
> queryperf.c:1369: error: ‘PACKETSZ’ undeclared (first use in this
> function)
> queryperf.c:1369: error: (Each undeclared identifier is reported only
> once
> queryperf.c:1369: error: for each function it appears in.)
> queryperf.c:1376: error: ‘QUERY’ undeclared (first use in this  
> function)
> queryperf.c:1376: error: ‘C_IN’ undeclared (first use in this  
> function)
> queryperf.c:1369: error: storage size of ‘packet_buffer’ isn’t known
> queryperf.c: In function ‘process_single_response’:
> queryperf.c:1610: warning: pointer targets in passing argument 6 of
> ‘recvfrom’ differ in signedness
> make: *** [queryperf.o] Error 1
>

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
DEFS = -DBIND_8_COMPAT -DHAVE_CONFIG_H

make
# Then run from the local directory (there is no make install)

BTW - if you want to link queryperf with your build of bind-9.5.0 you  
need the change above and to configure bind-9.5.0 like this
./configure --enable-libbind --with-libtool

HTH
John
---
John Dickinson






More information about the bind-users mailing list