# bro and FreeBSD 5.0

**URL:** https://community.zeek.org/t/bro-and-freebsd-5-0/345
**Category:** Zeek
**Created:** [February 8, 2003, 2:14am UTC](https://community.zeek.org/t/bro-and-freebsd-5-0/345 "2003-02-08T02:14:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jon\_Dugan](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jon\_Dugan](https://community.zeek.org/u/Jon_Dugan)
#### Post date: [February 8, 2003, 2:14am UTC](https://community.zeek.org/t/bro-and-freebsd-5-0/345/1 "2003-02-08T02:14:08Z")

</div>

I've been trying to get bro to compile properly under FreeBSD 5.0. It looks  
&nbsp;&nbsp;like the change to gcc3 broke some things. I've attached a patch that gets  
&nbsp;&nbsp;the compile further along than initially, but I got stuck. Of course this  
&nbsp;&nbsp;causes the compiler to kvetch about using depricated headers. Here's the  
&nbsp;&nbsp;error message that has me stumped:

g++ -I. -Ilibedit -O -c DebugCmds.cc  
In file included from /usr/include/g++/backward/map.h:59,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Type.h:29,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from ID.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Expr.h:28,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Debug.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from DebugCmds.cc:11:  
/usr/include/g++/backward/backward\_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the \<X\> header for the \<X.h\> header for C++ includes, or \<sstream\> instead of the deprecated header \<strstream.h\>. To disable this warning use -Wno-deprecated.  
DebugCmds.cc: In function `int find\_all\_matching\_cmds(const std::string&, const  
&nbsp;&nbsp;&nbsp;char\*\*)':  
DebugCmds.cc:164: invalid conversion from `const char*' to `unsigned int'  
DebugCmds.cc:164: initializing argument 1 of `int std::basic\_string\<\_CharT,  
&nbsp;&nbsp;&nbsp;\_Traits, \_Alloc\>::compare(\_Alloc::size\_type, \_Alloc::size\_type, const  
&nbsp;&nbsp;&nbsp;\_CharT\*) const [with \_CharT = char, \_Traits = std::char\_traits\<char\>, \_Alloc  
&nbsp;&nbsp;&nbsp;= std::allocator\<char\>]'  
DebugCmds.cc:164: invalid conversion from `unsigned int' to `const char\*'  
DebugCmds.cc:164: initializing argument 3 of `int std::basic\_string\<\_CharT,  
&nbsp;&nbsp;&nbsp;\_Traits, \_Alloc\>::compare(\_Alloc::size\_type, \_Alloc::size\_type, const  
&nbsp;&nbsp;&nbsp;\_CharT\*) const [with \_CharT = char, \_Traits = std::char\_traits\<char\>, \_Alloc = std::allocator\<char\>]'  
\*\*\* Error code 1

&nbsp;&nbsp;I can't seem to get it to find the hash\<\> templates.

&nbsp;&nbsp;I'm guessing that someone with more experience in C++ would be able to see  
&nbsp;&nbsp;what's going on. I have very little experience with templates, etc in C++.

&nbsp;&nbsp;Also, the parse.y doesn't seem to be compatible with bison, I had to force  
&nbsp;&nbsp;the Makefile to use the system yacc (byacc).

Jon

[bro-0.8a20-fbsd5.patch](https://community.zeek.org/uploads/short-url/5fJdvc26T82qBmK2Wwt3wBQ00l9.patch) (2 KB)

---

<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: [February 9, 2003, 5:30pm UTC](https://community.zeek.org/t/bro-and-freebsd-5-0/345/2 "2003-02-09T17:30:51Z")

</div>

Can you try the attached patch? There seems to be some incompatibility  
from gcc \<3.0 to \>= 3.0.

Robin

[a.diff](https://community.zeek.org/uploads/short-url/oQpCbBos7MRX0UBzgHltTETyBzT.diff) (526 Bytes)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)
#### Post date: [May 6, 2022, 3:36pm UTC](https://community.zeek.org/t/bro-and-freebsd-5-0/345/3 "2022-05-06T15:36:42Z")

</div>


