[Bro] Problems Building Bro

Dominic Steinitz dominic.steinitz at blueyonder.co.uk
Sun Jun 18 09:44:56 PDT 2006


On Sunday 18 Jun 2006 4:05 pm, Christian Kreibich wrote:
> On Sun, 2006-06-18 at 16:44 +0100, Dominic Steinitz wrote:
> > Christian,
> >
> > That's improved things but I'm still getting one unresolved reference.
> >
> > Dominic.
> >
> > DNS_Mgr.o(.text+0x2e61): In function `DNS_Mgr::GetFds(int*, int*, int*)':
> > /home/dom/Desktop/bro-1.1/src/DNS_Mgr.cc:933: undefined reference to
> > `nb_dns_fd'
> > collect2: ld returned 1 exit status
>
> I don't have more time to look into this, but I'm sure someone else
> will.

I hope so :-(

>
> I'm much more interested to find out how nbdns can be made to work on
> your system, so if you could find out whether there's really no resolver
> library that defines ns_inittab/res_mkquery, that'd help...

My resolver library (-lresolv) contains the strings mkquery and ns_initparse

[dom at tility lib]$ strings /lib/libresolv.so.2 | grep mkquery
__res_mkquery
__res_nmkquery

[dom at tility lib]$ strings /lib/libresolv.so.2 | grep parse
;; ns_initparse: %s
;; ns_parserr: %s

However, configure fails to find ns_initparse despite having -lresolv on the 
compile command. Indeed, trying it standalone confirms this.

[dom at tility bind-9.3.2]$ cat test.c
#include <arpa/nameser.h>

int
main ()
{
  ns_initparse(0,0,0);
  ;
  return 0;
}
[dom at tility bind-9.3.2]$ gcc -o test test.c -lresolv
/home/dom/tmp/ccm4khEq.o(.text+0x1a): In function `main':
: undefined reference to `__ns_initparse'
collect2: ld returned 1 exit status

Googling didn't turn up an obvious place to get a resolver library that 
contains ns_initparse so I'm a bit stumped.

Dominic.

configure:8007: checking for ns_inittab/res_mkquery with resolver '-lresolv'
configure:8045: gcc -o conftest -g -O2 -I/include -I/usr/include  
-I/home/dom/Desktop/libpcap-0.9.4  -I${top_s
rcdir}/linux-include  conftest.c -lpcap -lpcap 
-L/home/dom/Desktop/libpcap-0.9.4 -lpcap  -lssl -lcrypto -lreso
lv >&5
/home/dom/tmp/ccgYny2w.o(.text+0x10): In function `main':
/home/dom/Desktop/bro-1.1/configure:8037: undefined reference to 
`__ns_initparse'
collect2: ld returned 1 exit status
configure:8048: $? = 1
configure: failed program was:
#line 8026 "configure"
#include "confdefs.h"
#include <arpa/nameser.h>
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
ns_initparse(0,0,0);
  ;
  return 0;
}

Dominic.





More information about the Bro mailing list