# Problems Building Bro

**URL:** <https://community.zeek.org/t/problems-building-bro/971>\
**Category:** Zeek\
**Created:** [June 11, 2006, 12:29pm UTC](https://community.zeek.org/t/problems-building-bro/971 "2006-06-11T12:29:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 11, 2006, 12:29pm UTC](https://community.zeek.org/t/problems-building-bro/971/1 "2006-06-11T12:29:57Z")

</div>

I can't build Bro on my Linux box.

[dom@tility bro-1.1]$ uname -a  
Linux [tility.canterburysoftware.com](http://tility.canterburysoftware.com) 2.4.22-10mdk #1 Thu Sep 18 12:30:58 CEST 2003 i686 unknown unknown GNU/Linux

Trying to build bro-1.1 I get this:

checking for library containing inet\_aton... none required  
checking for tgetnum in -ltermcap... no  
checking for termcap in /usr/lib{64}/termcap/... no  
configure: error: libtermcap not found in default paths nor /usr/lib{64}/termcap.

Trying to build bro-0.9a11 I get this

checking for long long... yes  
checking size of long long... configure: error: cannot compute sizeof (long long), 77

I get different problems on my NetBSD box.

heisenberg: {14} uname -a  
NetBSD heisenberg 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:04:02 UTC 2005 [builds@works.netbsd.org](mailto:builds@works.netbsd.org):/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC i386

source='bro\_sem\_sysv.c' object='bro\_sem\_sysv.lo' libtool=yes depfile='.deps/bro\_sem\_sysv.Plo' tmpdepfile='.deps/bro\_sem\_sysv.TPlo' depmode=gcc3 /bin/sh ../depcomp /bin/sh ../libtool --mode=compile gcc -DHAVE\_CONFIG\_H -I. -I. -I.. -W -Wall -Wno-unused -I../compat -g -O2 -c -o bro\_sem\_sysv.lo `test -f bro_sem_sysv.c || echo './'`bro\_sem\_sysv.c  
rm -f .libs/bro\_sem\_sysv.lo  
gcc -DHAVE\_CONFIG\_H -I. -I. -I.. -W -Wall -Wno-unused -I../compat -g -O2 -c bro\_sem\_sysv.c -MT bro\_sem\_sysv.lo -MD -MP -MF .deps/bro\_sem\_sysv.TPlo -fPIC -DPIC -o .libs/bro\_sem\_sysv.lo  
bro\_sem\_sysv.c: In function `\_\_bro\_sem\_init':  
bro\_sem\_sysv.c:77: error: storage size of `arg' isn't known  
\*\*\* Error code 1

Dominic.

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 11, 2006, 1:51pm UTC](https://community.zeek.org/t/problems-building-bro/971/2 "2006-06-11T13:51:12Z")

</div>

Hi Dominic,

> I can't build Bro on my Linux box.
> 
> [dom@tility bro-1.1]$ uname -a  
> Linux tility.canterburysoftware.com 2.4.22-10mdk #1 Thu Sep 18 12:30:58  
> CEST 2003 i686 unknown unknown GNU/Linux
> 
> Trying to build bro-1.1 I get this:
> 
> checking for library containing inet\_aton... none required  
> checking for tgetnum in -ltermcap... no  
> checking for termcap in /usr/lib{64}/termcap/... no  
> configure: error: libtermcap not found in default paths nor  
> /usr/lib{64}/termcap.

well, do you have it installed, and if so, where? We're currently  
checking for just -ltermcap and then specifically add /usr/lib/termcap  
and /usr/lib64/termcap, if appropriate.

I'm getting annoyed with this termcap stuff. Its location is apparently  
quite diverse, so it'd be nice if they either provided an m4 macro to  
the autoconf guys, or at least shipped a termcap-config or the  
pkg-config equivalent. If anyone on this list has pointers to reliable  
termcap configure checks, please point them out.

> Trying to build bro-0.9a11 I get this
> 
> checking for long long... yes  
> checking size of long long... configure: error: cannot compute sizeof  
> (long long), 77

That's odd, it means that AC\_CHECK\_SIZEOF(long long) fails. I can't make  
an immediate suggestion for fixing this.

> I get different problems on my NetBSD box.

Configure with --disable-broccoli for now. If you need Broccoli, go to  
aux/broccoli after the Bro build and configure and build it separately.  
Try --disable-posix-semaphores. If that doesn't help, feel free to email  
me. I'll throw out all of the semaphores stuff once I have time for  
Broccoli again, because it doesn't help instrumentation in enough  
situations to warrant the build headaches it's been causing.

Cheers,  
Christian.

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [June 11, 2006, 5:30pm UTC](https://community.zeek.org/t/problems-building-bro/971/3 "2006-06-11T17:30:55Z")

</div>

Don't mind this one. This is most probably due to linking with  
"-ltermcap" when doing the long-long test. So once the termcap issue  
is solved, this should disappear too.

Robin

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 11, 2006, 5:52pm UTC](https://community.zeek.org/t/problems-building-bro/971/4 "2006-06-11T17:52:55Z")

</div>

Ah right! In the older version the termcap check didn't abort on error.

Cheers,  
Christian.

---

<div class="post-metadata">

**Author:** ![Jason\_Lee](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@Jason\_Lee](https://community.zeek.org/u/Jason_Lee)\
**Post date:** [June 11, 2006, 8:15pm UTC](https://community.zeek.org/t/problems-building-bro/971/5 "2006-06-11T20:15:01Z")

</div>

Christian Kreibich wrote:

> ```auto
> Hi Dominic,
> 
>   
> 
> ```
> 
> > ```auto
> > Trying to build bro-0.9a11 I get this
> > 
> > checking for long long... yes
> > checking size of long long... configure: error: cannot compute sizeof 
> > (long long), 77
> >     
> > 
> > ```
> 
> ```auto
> 
> That's odd, it means that AC_CHECK_SIZEOF(long long) fails. I can't make
> an immediate suggestion for fixing this.
> 
> ```

I think this is just the termcap problem again, I’d have to see the config.log to be sure, but  
this is usually just a failure in linking. The configure was tightened up in 1.1 to point to the  
termcap problem (and not give this misleading error)

Cheers,  
jason

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 11, 2006, 9:04pm UTC](https://community.zeek.org/t/problems-building-bro/971/6 "2006-06-11T21:04:55Z")

</div>

Christian Kreibich wrote:

> Hi Dominic,
> 
> > I can't build Bro on my Linux box.
> > 
> > [dom@tility bro-1.1]$ uname -a  
> > Linux tility.canterburysoftware.com 2.4.22-10mdk #1 Thu Sep 18 12:30:58 CEST 2003 i686 unknown unknown GNU/Linux
> > 
> > Trying to build bro-1.1 I get this:
> > 
> > checking for library containing inet\_aton... none required  
> > checking for tgetnum in -ltermcap... no  
> > checking for termcap in /usr/lib{64}/termcap/... no  
> > configure: error: libtermcap not found in default paths nor /usr/lib{64}/termcap.
> 
> well, do you have it installed, and if so, where? We're currently  
> checking for just -ltermcap and then specifically add /usr/lib/termcap  
> and /usr/lib64/termcap, if appropriate.

Christian,

Thanks for your reply. I thought I had it installed:

[dom@tility dom]$ rpm -qil libtermcap2-2.0.8-35mdk  
Name : libtermcap2 Relocations: (not relocateable)  
Version : 2.0.8 Vendor: MandrakeSoft  
Release : 35mdk Build Date: Mon 04 Aug 2003 08:35:44 BST  
Install Date: Sat 03 Jul 2004 18:28:51 BST Build Host: hp6.mandrakesoft.com  
Group : System/Libraries Source RPM: libtermcap-2.0.8-35mdk.src.rpm  
Size : 19266 License: LGPL  
Signature : DSA/SHA1, Mon 04 Aug 2003 09:00:17 BST, Key ID e7898ae070771ff3  
Packager : Gwenole Beauchesne \<gbeauchesne@mandrakesoft.com\>  
URL : ftp://metalab.unc.edu/pub/Linux/GCC/  
Summary : Development tools for programs which will access the termcap database  
Description :  
The libtermcap package contains a basic system library needed to access  
the termcap database. The termcap library supports easy access to the  
termcap database, so that programs can output character-based displays in  
a terminal-independent manner.  
/lib/libtermcap.so.2  
/lib/libtermcap.so.2.0.8  
/usr/share/doc/libtermcap2-2.0.8  
/usr/share/doc/libtermcap2-2.0.8/ChangeLog  
/usr/share/doc/libtermcap2-2.0.8/README

I tried:

ln -s libtermcap.so.2 libtermcap  
ln -s /lib/libtermcap.so.2 libtermcap

but to no avail.

> I'm getting annoyed with this termcap stuff. Its location is apparently  
> quite diverse, so it'd be nice if they either provided an m4 macro to  
> the autoconf guys, or at least shipped a termcap-config or the  
> pkg-config equivalent. If anyone on this list has pointers to reliable  
> termcap configure checks, please point them out.
> 
> > Trying to build bro-0.9a11 I get this
> > 
> > checking for long long... yes  
> > checking size of long long... configure: error: cannot compute sizeof (long long), 77
> 
> That's odd, it means that AC\_CHECK\_SIZEOF(long long) fails. I can't make  
> an immediate suggestion for fixing this.
> 
> > I get different problems on my NetBSD box.
> 
> Configure with --disable-broccoli for now. If you need Broccoli, go to  
> aux/broccoli after the Bro build and configure and build it separately.  
> Try --disable-posix-semaphores. If that doesn't help, feel free to email  
> me. I'll throw out all of the semaphores stuff once I have time for  
> Broccoli again, because it doesn't help instrumentation in enough  
> situations to warrant the build headaches it's been causing.

I did try that but ran into a different problem:

heisenberg: {34} ./configure --disable-broccoli  
checking build system type... i386-unknown-netbsdelf3.0  
checking host system type... i386-unknown-netbsdelf3.0  
checking target system type... i386-unknown-netbsdelf3.0  
checking for a BSD-compatible install... /usr/bin/install -c  
checking whether build environment is sane... yes  
checking for gawk... no  
checking for mawk... no  
checking for nawk... no  
checking for awk... awk  
checking whether make sets \{MAKE\}\.\.\. yes checking for style of include used by make\.\.\. GNU checking for gcc\.\.\. gcc checking for C compiler default output\.\.\. a\.out checking whether the C compiler works\.\.\. yes checking whether we are cross compiling\.\.\. no checking for suffix of executables\.\.\. checking for suffix of object files\.\.\. o checking whether we are using the GNU C compiler\.\.\. yes checking whether gcc accepts \-g\.\.\. yes checking dependency style of gcc\.\.\. gcc3 checking for flex\.\.\. flex checking for flex\.\.\. \(cached\) flex checking for yywrap in \-lfl\.\.\. yes checking lex output file root\.\.\. lex\.yy checking whether yytext is a pointer\.\.\. yes checking for bison\.\.\. no checking for byacc\.\.\. no checking for g\+\+\.\.\. g\+\+ checking whether we are using the GNU C\+\+ compiler\.\.\. yes checking whether g\+\+ accepts \-g\.\.\. yes checking dependency style of g\+\+\.\.\. gcc3 checking for a BSD\-compatible install\.\.\. /usr/bin/install \-c checking whether make sets {MAKE}... (cached) yes  
checking for gzip... gzip  
configure: error: unknown enable option: broccoli

Thanks, Dominic.

---

<div class="post-metadata">

**Author:** ![Ruoming\_Pang](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@Ruoming\_Pang](https://community.zeek.org/u/Ruoming_Pang)\
**Post date:** [June 11, 2006, 8:19pm UTC](https://community.zeek.org/t/problems-building-bro/971/7 "2006-06-11T20:19:05Z")

</div>

> heisenberg: {34} ./configure --disable-broccoli  
> configure: error: unknown enable option: broccoli

This seems to be caused by a missing "broccoli" in:

AC\_LBL\_ENABLE\_CHECK(brov6 int64 activemapping expire-dfa-states debug select-loop openssl shippedpcap mpatrol perl gtk-doc)

Please to try adding it and see if it fixes the problem.

Ruoming

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 11, 2006, 11:17pm UTC](https://community.zeek.org/t/problems-building-bro/971/8 "2006-06-11T23:17:46Z")

</div>

Hi Dominic -- do you have the devel RPM installed? The libtermcap.so is  
likely the crucial bit, as will be the header:

christian@strangepork:/usr/lib \> rpm -ql libtermcap-devel  
/usr/include/termcap.h  
/usr/lib/libtermcap.a  
/usr/lib/libtermcap.so  
/usr/share/info/termcap.info.gz

Regarding the other issue, please du as Jason + Vern suggest.

Cheers,  
Christian.

---

<div class="post-metadata">

**Author:** ![Joshua\_Krage](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@Joshua\_Krage](https://community.zeek.org/u/Joshua_Krage)\
**Post date:** [June 12, 2006, 3:06am UTC](https://community.zeek.org/t/problems-building-bro/971/9 "2006-06-12T03:06:07Z")

</div>

Debian (for example), doesn't ship a termcap. Their equivalent is ncurses.

Termcap is required by libedit, but I don't see any place in the build  
process that actually uses libedit. I've compiled (but not yet actually  
run) the tree without libedit (or libtermcap) successfully. Am I missing  
something?

(working from bro-1.1 sources)

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 17, 2006, 7:59am UTC](https://community.zeek.org/t/problems-building-bro/971/10 "2006-06-17T07:59:00Z")

</div>

Christian Kreibich wrote:

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 17, 2006, 8:17am UTC](https://community.zeek.org/t/problems-building-bro/971/11 "2006-06-17T08:17:27Z")

</div>

Now configure completes without error but I get the following error when I try  
to make. Any suggestions?

Thanks, Dominic.

g++ -g -O2 -o bro dce\_rpc\_pac.o ncp\_pac.o smb\_pac.o main.o net\_util.o  
util.o parse.o scan.o re-parse.o re-scan.o rule-parse.o rule-scan.o Active.o  
Anon.o ARP.o Attr.o BackDoor.o Base64.o BPF\_Program.o BroString.o CCL.o  
ChunkedIO.o CompHash.o Conn.o ConnCompressor.o DCE\_RPC.o DFA.o DNS.o  
DNS\_Mgr.o DbgBreakpoint.o DbgHelp.o DbgWatch.o Debug.o DebugCmds.o  
DebugLogger.o Desc.o Dict.o Discard.o EquivClass.o Event.o EventHandler.o  
EventRegistry.o Expr.o FTP.o File.o Finger.o Frag.o Frame.o Func.o Gnutella.o  
HTTP.o Hash.o ICMP.o ID.o Ident.o IntSet.o InterConn.o IOSource.o IRC.o  
List.o Logger.o Login.o MIME.o NCP.o NFA.o NFS.o NTP.o NVT.o Net.o NetVar.o  
NetbiosSSN.o Obj.o OSFinger.o PacketFilter.o PacketSort.o  
PersistenceSerializer.o PktDagSrc.o PktSrc.o PolicyFile.o POP3.o Portmap.o  
PrefixTable.o PriorityQueue.o Queue.o RE.o RPC.o Reassem.o RemoteSerializer.o  
Rlogin.o RSH.o Rule.o RuleAction.o RuleCondition.o RuleMatcher.o  
ScriptAnaly.o SmithWaterman.o SMB.o SMTP.o SSH.o Scope.o  
SerializationFormat.o SerialObj.o Serializer.o Sessions.o StateAccess.o  
Stats.o SteppingStone.o Stmt.o TCP.o TCP\_Contents.o TCP\_Endpoint.o  
TCP\_Rewriter.o Telnet.o Timer.o Traverse.o Trigger.o TwoWise.o Type.o UDP.o  
Val.o Var.o XDR.o bsd-getopt-long.o cq.o md5.o patricia.o setsignal.o  
version.o strsep.o X509.o SSLCiphers.o SSLInterpreter.o SSLProxy.o SSLv2.o  
SSLv3.o SSLv3Automaton.o -Llibedit -ledit -lpcap -lpcap  
-L/home/dom/Desktop/libpcap-0.9.4 -lpcap -lssl -lcrypto -ltermcap -lm  
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'  
DNS\_Mgr.o(.text+0x2ec7): In function `DNS\_Mgr::AnswerAvailable(int)':  
/home/dom/Desktop/bro-1.1/src/DNS\_Mgr.cc:1007: undefined reference to  
`nb\_dns\_fd'  
collect2: ld returned 1 exit status  
make[4]: \*\*\* [bro] Error 1  
make[4]: Leaving directory `/home/dom/Desktop/bro-1.1/src'  
make[3]: \*\*\* [all-recursive] Error 1  
make[3]: Leaving directory `/home/dom/Desktop/bro-1.1/src'  
make[2]: \*\*\* [all] Error 2  
make[2]: Leaving directory `/home/dom/Desktop/bro-1.1/src'  
make[1]: \*\*\* [all-recursive] Error 1  
make[1]: Leaving directory `/home/dom/Desktop/bro-1.1'  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 17, 2006, 1:11pm UTC](https://community.zeek.org/t/problems-building-bro/971/12 "2006-06-17T13:11:17Z")

</div>

No worries, glad it gets a little further now. 🙂 Your case suggests  
though that we should be testing for the header file first, because that  
would make it more immediately clear that it's the devel setup that's  
lacking.

Cheers,  
Christian.

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 17, 2006, 1:17pm UTC](https://community.zeek.org/t/problems-building-bro/971/13 "2006-06-17T13:17:57Z")

</div>

Could you please post the full configure run output?

Cheers,  
Christian.

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 18, 2006, 9:58am UTC](https://community.zeek.org/t/problems-building-bro/971/14 "2006-06-18T09:58:14Z")

</div>

I've resent this as a reply without the attachment otherwise the mailing list  
blocks it as being too big. If anyone wants a copy of the various config  
files, please let me know. Dominic.

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 18, 2006, 10:19am UTC](https://community.zeek.org/t/problems-building-bro/971/15 "2006-06-18T10:19:26Z")

</div>

> \> \> \> Now configure completes without error but I get the following error  
> \> \> \> when I try to make. Any suggestions?  
> \> \>  
> \> \> Could you please post the full configure run output?  
> \> \>  
> \> \> Cheers,  
> \> \> Christian.  
> \>  
> \> Christian,  
> \>  
> \> I'm not sure which outputs you want. Is it just configure.log (which I've  
> \> attached) or do you need other things as well?  
> \>  
> \> I've dug around a bit and I think I've got as far as seeing that in  
> \> src/Makefile, dns\_srcs is null.  
> \>  
> \> # this is better  
> \> #dns\_srcs = nb\_dns.c  
> \>  
> \> So this means no nb\_dns.o gets built resulting in the error message. I'm  
> \> not clear what creates src/Makefile. I also see that  
> \>  
> \> NBDNS =  
> \>  
> \> Presumably this means that NBDNS is undefined so that nb\_dns.c should be  
> \> built.  
> \>  
> \> I'll try building compiling nb\_dns.c by hand and then see if make will  
> \> complete.

nd\_dns.c compiled ok but the final link still fails but with different errors.  
Given that it compiles ok but doesn't link, I'm guessing it's looking for a  
library somewhere. I'll see if I can figure out which library and then point  
it in the right direction.

nb\_dns.o(.text+0x2e0): In function `\_nb\_dns\_mkquery':  
/home/dom/Desktop/bro-1.1/src/nb\_dns.c:293: undefined reference to  
`\_\_res\_mkquery'  
nb\_dns.o(.text+0x5f1): In function `nb\_dns\_activity':  
/home/dom/Desktop/bro-1.1/src/nb\_dns.c:476: undefined reference to  
`\_\_ns\_initparse'  
nb\_dns.o(.text+0x67c):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:519: undefined  
reference to `\_ns\_flagdata'  
nb\_dns.o(.text+0x684):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:519: undefined  
reference to `\_ns\_flagdata'  
nb\_dns.o(.text+0x866):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:561: undefined  
reference to `\_\_ns\_parserr'  
nb\_dns.o(.text+0x959):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:610: undefined  
reference to `\_\_dn\_expand'

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 18, 2006, 12:11pm UTC](https://community.zeek.org/t/problems-building-bro/971/16 "2006-06-18T12:11:57Z")

</div>

Hi Dominic,

> Christian,
> 
> I'm not sure which outputs you want. Is it just configure.log (which I've  
> attached) or do you need other things as well?

I actually only meant what you get to see at the console, but the .log  
is even better. Thanks. This is what I was after:

configure:7934: checking for ns\_msg  
configure:7981: result: yes  
configure:8007: checking for ns\_inittab/res\_mkquery with resolver 'none'  
configure:8128: result: no  
configure:8007: checking for ns\_inittab/res\_mkquery with resolver '-lresolv'  
configure:8128: result: no  
configure:8007: checking for ns\_inittab/res\_mkquery with resolver '/usr/lib/libresolv.a'  
configure:8128: result: no  
configure:8134: Nonblocking DNS disabled.

Given this, you should not have seen the link error. I think the problem  
is that DNS\_Mgr.cc's DNS\_Mgr::AnswerAvailable() isn't correctly  
protected by #ifdef HAVE\_NB\_DNS. The attached diff might fix it but is  
untested.

> I've dug around a bit and I think I've got as far as seeing that in  
> src/Makefile, dns\_srcs is null.

Yes, this is in line with the above, since configure has determined that  
it can't build with nbdns support.

Cheers,  
Christian.

[nbdns.diff](https://community.zeek.org/uploads/short-url/gGiK6nK0dl8Lm3klpLnuBTSO9Ty.diff) (907 Bytes)

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 18, 2006, 12:16pm UTC](https://community.zeek.org/t/problems-building-bro/971/17 "2006-06-18T12:16:38Z")

</div>

Adding -lresolv gets rid of one of the unresolved references (res\_mkquery)  
but I'm still left with the others. They are all defined in \<arpa/nameser.h\>  
but it's not clear which library needs to be linked in.

Dominic.

nb\_dns.o(.text+0x5f1): In function `nb\_dns\_activity':  
/home/dom/Desktop/bro-1.1/src/nb\_dns.c:476: undefined reference to  
`\_\_ns\_initparse'  
nb\_dns.o(.text+0x67c):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:519: undefined  
reference to `\_ns\_flagdata'  
nb\_dns.o(.text+0x684):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:519: undefined  
reference to `\_ns\_flagdata'  
nb\_dns.o(.text+0x866):/home/dom/Desktop/bro-1.1/src/nb\_dns.c:561: undefined  
reference to `\_\_ns\_parserr'

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 18, 2006, 3:44pm UTC](https://community.zeek.org/t/problems-building-bro/971/18 "2006-06-18T15:44:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [June 18, 2006, 3:05pm UTC](https://community.zeek.org/t/problems-building-bro/971/19 "2006-06-18T15:05:54Z")

</div>

I don't have more time to look into this, but I'm sure someone else  
will.

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...

Cheers,  
Christian.

---

<div class="post-metadata">

**Author:** ![Dominic\_Steinitz](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dominic\_Steinitz](https://community.zeek.org/u/Dominic_Steinitz)\
**Post date:** [June 18, 2006, 4:44pm UTC](https://community.zeek.org/t/problems-building-bro/971/20 "2006-06-18T16:44:56Z")

</div>

> \> 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@tility lib]$ strings /lib/libresolv.so.2 | grep mkquery  
\_\_res\_mkquery  
\_\_res\_nmkquery

[dom@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@tility bind-9.3.2]$ cat test.c  
#include \<arpa/nameser.h\>

int  
main ()  
{  
&nbsp;&nbsp;ns\_initparse(0,0,0);  
&nbsp;&nbsp;;  
&nbsp;&nbsp;return 0;  
}  
[dom@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  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extern "C"  
# endif  
&nbsp;&nbsp;&nbsp;int F77\_DUMMY\_MAIN() { return 1; }  
#endif  
int  
main ()  
{  
ns\_initparse(0,0,0);  
&nbsp;&nbsp;;  
&nbsp;&nbsp;return 0;  
}

Dominic.

[Next page](https://community.zeek.org/t/problems-building-bro/971.md?page=2)
