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

Wolfgang Nagele wnagele at ripe.net
Mon Jan 26 11:17:48 UTC 2009


Hi,

this is the patch i used to make it work:
---cut---
--- configure.orig      2008-12-03 00:04:58.000000000 +0000
+++ configure   2009-01-06 09:03:46.000000000 +0000
@@ -24509,7 +24509,7 @@


 port_resolver_dynamic="builtin -lbind -lresolv"
-port_resolver_static="/usr/lib/libresolv.a /usr/lib64/libresolv.a"
+#port_resolver_static="/usr/lib/libresolv.a /usr/lib64/libresolv.a"

 save_ldflags="$LDFLAGS"
 save_libs="$LIBS"
---cut---

Btw. it is a specific problem on x86_64 environments.

Regards,
Wolfgang

Stephane Bortzmeyer wrote:
> 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
> Makefile.debian).
> _______________________________________________
> dns-operations mailing list
> dns-operations at lists.dns-oarc.net
> https://lists.dns-oarc.net/mailman/listinfo/dns-operations



More information about the dns-operations mailing list