2008-01-19 00:06:36 UTC
I'm trying to compile MySQL SDB with BIND v9.4.2 and MySQL v4.1.22. MySQL is installed and functioning fine. I've followed the README file with MySQL SDB and done:
- copied mysqldb.c to bind-9.4.2/bin/named/
- copied mysqldb.h to bind-9.4.2/bin/named/include/
- set the following in bind-9.4.2/bin/named/Makefile.in
DBDRIVER_OBJS = mysqldb.@O@
DBDRIVER_SRCS = mysqldb.c
DBDRIVER_INCLUDES = -I'/usr/include/mysql'
DBDRIVER_LIBS = -L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl -lm
I've added the following to bind-9.4.2/bin/named/main.c - #include "mysqldb.h"
When it states about registering the driver, I've added "mysqldb_init();" to line 694 of main.c just before the line: ns_server_create(ns_g_mctx, &ns_g_server);
When it states about unregistration, I've added "mysqldb_clear();" to line 705 of main.c just after the line:
ns_server_destroy(&ns_g_server);
I compile BIND with the following:
CFLAGS="-O2 -march=i386" ./configure --prefix=/usr --sysconfdir=/etc/bind --localstatedir=/var --with-libtool --enable-shared --enable-threads --with-openssl=/usr
When I run 'make' it bombs out with the following error:
t -Wpointer-arith -fno-strict-aliasing -c mysqldb.c -fPIC -DPIC -o .libs/mysqldb.o
mysqldb.c:41:27: named/mysqldb.h: No such file or directory
mysqldb.c:456: warning: no previous prototype for 'mysqldb_init'
mysqldb.c:467: warning: no previous prototype for 'mysqldb_clear'
mysqldb.c:131: warning: 'quotestring' defined but not used
make[2]: *** [mysqldb.lo] Error 1
make[2]: Leaving directory `/packages/bind-9.4.2/bin/named'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/packages/bind-9.4.2/bin'
make: *** [subdirs] Error 1
I've tried modified the path to mysqldb.h but it still bombs out. Can anyone help me out here?
Many thanks.
Stuart.