Menu

Argh!!! BIND & MySQL SDB won't compile

Help
Anonymous
2008-01-19
2013-09-17
  • Anonymous

    Anonymous - 2008-01-19

    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.
          

     
    • Anders Mårtensson

      don't know if you're still watching this page, but...

      You have to make some small adjustments for the installation instructions to work:

      Where it says: #include "mysqldb.h",
      change that to #include "include/mysqldb.h"
      (I think the only place is in main.c, where you were told to add the first include row)

      and in mysqldb.c:
      change: #include <named/mysqldb.h>
      change that to: #include "include/mysqldb.h"

      After this the compilation should work.

      Regards
      Anders

       
  • Iosif Magomedov

    Iosif Magomedov - 2013-09-17

    Is it work with BIND-9.9 ?
    I tried compile but all my attempt was unsuccessful.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.