Bro-1.0 - error in compilation

Hello! Excuse me for posting such kind of problems on this mailing list, but any help would be appreciated!
I tried to compile bro-1.0 and I got the following error(s):

[...]
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../src/binpac -I../src -I. -I.. -Ilibedit -I../linux-include -I../aux/libpcap-0.7.2 -O -W -Wall -Wno-unused -I. -I../src/binpac -I../src -I. -I.. -g -O2 -c `test -f nb_dns.c || echo './'`nb_dns.c
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 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 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 SMB.o SmithWaterman.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 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 nb_dns.o -Llibedit -ledit -L../aux/libpcap-0.7.2 -lpcap -lresolv -lz /usr/lib/libresolv.a -ltermcap -L/usr/lib/termcap -lm
RemoteSerializer.o(.text+0x1802): In function `SocketComm::ProcessPeerCompress(SocketComm::Peer*)':
/home/falletta/bro-1.0/src/ChunkedIO.h:282: undefined reference to `vtable for CompressedChunkedIO'
RemoteSerializer.o(.text+0x1fcf): In function `SocketComm::ProcessParentCompress()':
/home/falletta/bro-1.0/src/ChunkedIO.h:282: undefined reference to `vtable for CompressedChunkedIO'
collect2: ld returned 1 exit status
make[4]: *** [bro] Error 1
make[4]: Leaving directory `/home/falletta/bro-1.0/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/falletta/bro-1.0/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/falletta/bro-1.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/falletta/bro-1.0'
make: *** [all] Error 2

I'm using SuSE Linux 9.1 (i586), gcc 3.3.3
Any suggestion?

Thanks for the attention,
  Vincenzo :slight_smile:

Hi Vincenzo,

could you post the full output of your configure run and the output of
"nm -a ChunkedIO.o"? Thanks.

Here it is :slight_smile:
BTW, another strange fact to me is that even if I have correctly installed the openSSL package, I get that "checking whether OPENSSL_add_all_algorithms_conf is declared... no" so finally I would have no OpenSSL support...
Thanks for your patience!
  Vincenzo

Christian Kreibich wrote:

output-nm.txt (2.83 KB)

output-configure.txt (5.48 KB)

Hi Vincenzo,

Here it is :slight_smile:
BTW, another strange fact to me is that even if I have correctly
installed the openSSL package, I get that "checking whether
OPENSSL_add_all_algorithms_conf is declared... no" so finally I would
have no OpenSSL support...

thanks for mentioning this detail, because it explains the problem. It
looks like ChunkedIO.cc makes the compilation of CompressedChunkedIO
depend on both libz *and* OpenSSL, even though it should only depend on
libz. We'll look into it and fix it for the next release.

Thanks for your patience!

Thanks for pointing out!

Cheers,
Christian.

Hello,

Here is another compile error, any pointers?

make[4]: Entering directory `/home/anton/bro-1.0/src/binpac'
source='pac_parse.cc' object='pac_parse.o' libtool=no \
depfile='.deps/pac_parse.Po' tmpdepfile='.deps/pac_parse.TPo' \
depmode=gcc3 /bin/sh ../../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -W -Wall -Wno-unused -g -O2 -c -o pac_parse.o `test -f pac_parse.cc || echo './'`pac_parse.cc
In file included from pac_parse.yy:48:
pac.h: In method `Object::Object ()':
pac.h:27: `asprintf' undeclared (first use this function)
pac.h:27: (Each undeclared identifier is reported only once for each
function it appears in.)
make[4]: *** [pac_parse.o] Error 1
make[4]: Leaving directory `/home/anton/bro-1.0/src/binpac'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/anton/bro-1.0/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/anton/bro-1.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/anton/bro-1.0'
make: *** [all] Error 2

Best,

Please add #include <stdio.h> to pac.h. (Vern: could you add this to the Bro 1.0 release? Thanks!)

Ruoming

In case asprintf is not in your stdio.h, please try the following patch on src/binpac/pac.h:

pac.h.diff (653 Bytes)