[dns-operations] Compiling ncap on Debian/Linux (Was: "NS .", the attack of the month?

Robert Edmonds edmonds at isc.org
Mon Jan 26 17:40:52 UTC 2009


Stephane Bortzmeyer wrote:
> Nice, thanks, but ncap does not compile on Debian :

oops.  i was attempting to get ncap to compile on debian without any
external dependencies (it may do so on i386, but not amd64), but
unfortunately i don't think this is possible yet on debian:

1) BIND8 resolver code was imported into glibc some time ago, but the
needed symbols are unusable despite prototypes existing in
<arpa/nameser.h>; they are not exported in any of glibc's dynamic libs
and are only available in libresolv.a (but not if you are trying to link
a library that uses these symbols on some architectures).  the rather
pathetic justification for this state of affairs is recorded here:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291609

    Those functions are internal functions. They are not exported,
    because there is no guarantee that the ABI or the API will be the
    same in the next versions.

(he doesn't explain why libc6-dev's <arpa/nameser.h> exposes prototypes
for those 'internal' functions, or why some symbols are exported and
some aren't.)

a while ago i surveyed some of the more popular solaris/linux/BSD OSes
and found similar levels of unsupport, mostly in the form of unexported
symbols (which varied from system to system!).  the most consistent OS
was openbsd, which exported no symbols at all and defined only constants
in <arpa/nameser.h>.

2) the same code (or rather, the original code that is still being
maintained) is also available in the BIND9 distribution, but it is not
enabled without a configure flag.  you should install the libbind-dev
debian package as this includes some needed headers (i.e. <isc/list.h>),
but it lacks the library actually called "libbind".  the fastest way to
get libbind installed on debian is to do something like:

    {0}:/tmp/bind9$ apt-get source bind9
    [...]
    {0}:/tmp/bind9$ cd bind9-9.5.0.dfsg.P2/lib/bind
    {0}:/tmp/bind9/bind9-9.5.0.dfsg.P2/lib/bind$ ./configure --with-libtool && make && make install

--with-libtool is important as you won't get a dynamic library
otherwise.

3) ISC has been preparing a separate libbind distribution (the code has
already been removed from 9.6.0 in preparation) but i do not know when
this will actually be released.

-- 
Robert Edmonds
edmonds at isc.org



More information about the dns-operations mailing list