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

Stephane Bortzmeyer bortzmeyer at nic.fr
Mon Jan 26 11:10:26 UTC 2009

On Sat, Jan 24, 2009 at 10:04:33PM -0500,
 Robert Edmonds <edmonds at gtisc.gatech.edu> wrote 
 a message of 303 lines which said:

> ncaptool as of 1.5.0 (see changes attached) supports this directly, e.g.

Nice, thanks, but ncap does not compile on Debian :

% make                            
make  all-am
make[1]: Entering directory `/home/stephane/tmp/ncap-1.5.0'
/bin/sh ./libtool --tag=CC   --mode=link gcc -Wall -Werror -Wunused -Wshadow -Wcast-qual -Wpointer-arith -Wwrite-strings -Wnested-externs -Wmissing-noreturn -Wmissing-prototypes -Wbad-function-cast -Wbad-function-cast -Wformat-nonliteral -Wextra -Wswitch-enum -g -O2  -version-info 43:0:0 /usr/lib/libresolv.a  -o libncap.la -rpath /usr/local/lib ncap_create.lo ncap_dns.lo ncap_icmp.lo ipreasm.lo  -lpcap -ldl -lrt 

*** Warning: Linking the shared library libncap.la against the
*** static library /usr/lib/libresolv.a is not portable!
gcc -shared  .libs/ncap_create.o .libs/ncap_dns.o .libs/ncap_icmp.o .libs/ipreasm.o  /usr/lib/libresolv.a -lpcap -ldl -lrt  -Wl,-soname -Wl,libncap.so.43 -o .libs/libncap.so.43.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/libresolv.a(ns_parse.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libresolv.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libncap.la] Error 1
make[1]: Leaving directory `/home/stephane/tmp/ncap-1.5.0'
make: *** [all] Error 2

The distribution directory at ISC contains a HOWTO.ncaptool.linux.txt
which is apparently outdated (it refers to a non-existing

More information about the dns-operations mailing list