# trouble: compile Bro in RedHat 8.0

**URL:** https://community.zeek.org/t/trouble-compile-bro-in-redhat-8-0/353
**Category:** Zeek
**Created:** [April 3, 2003, 3:58pm UTC](https://community.zeek.org/t/trouble-compile-bro-in-redhat-8-0/353 "2003-04-03T15:58:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Shaofu\_Wang](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Shaofu\_Wang](https://community.zeek.org/u/Shaofu_Wang)
#### Post date: [April 3, 2003, 3:58pm UTC](https://community.zeek.org/t/trouble-compile-bro-in-redhat-8-0/353/1 "2003-04-03T15:58:33Z")

</div>

Hi all  
Any help is wellcome  
In RedHat7.2, there are no such problem as following.

[w@cs bro-pub-0.7a175b]$ make  
c++ -I. -O -Ilinux-include -c main.cc  
In file included from main.cc:29:  
Active.h:30: type specifier omitted for parameter `string'  
Active.h:30: parse error before `&' token  
In file included from Val.h:27,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Frame.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:31:  
Type.h:29:20: hash\_map: No such file or directory  
In file included from Val.h:27,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Frame.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:31:  
Type.h:425: `hash' was not declared in this scope  
Type.h:425: parse error before `char'  
Type.h:426: 'NameMap' is used as a type, but is not defined as a type.  
In file included from main.cc:31:  
Frame.h:75: syntax error before `;' token  
In file included from Debug.h:30,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Expr.h:31,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Event.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:33:  
DbgBreakpoint.h:22: type specifier omitted for parameter `string'  
DbgBreakpoint.h:22: parse error before `)' token  
DbgBreakpoint.h:41: ISO C++ forbids declaration of `string' with no type  
DbgBreakpoint.h:41: parse error before `&' token  
DbgBreakpoint.h:42: semicolon missing after declaration of `DbgBreakpoint'  
DbgBreakpoint.h: In member function `int DbgBreakpoint::GetID() const':  
DbgBreakpoint.h:18: `BPID' undeclared (first use this function)  
DbgBreakpoint.h:18: (Each undeclared identifier is reported only once for each  
&nbsp;&nbsp;&nbsp;function it appears in.)  
DbgBreakpoint.h: In member function `bool DbgBreakpoint::IsTemporary() const':  
DbgBreakpoint.h:29: `temporary' undeclared (first use this function)  
DbgBreakpoint.h: At global scope:  
DbgBreakpoint.h:42: parse error before `&' token  
DbgBreakpoint.h:42: `bool' is now a keyword  
DbgBreakpoint.h:44: non-member function `int GetRepeatCount()' cannot have `  
&nbsp;&nbsp;&nbsp;const' method qualifier  
DbgBreakpoint.h: In function `int GetRepeatCount()':  
DbgBreakpoint.h:44: `repeat\_count' undeclared (first use this function)  
DbgBreakpoint.h: At global scope:  
DbgBreakpoint.h:47: non-member function `bool IsEnabled()' cannot have `const'  
&nbsp;&nbsp;&nbsp;method qualifier  
DbgBreakpoint.h: In function `bool IsEnabled()':  
DbgBreakpoint.h:47: `enabled' undeclared (first use this function)  
DbgBreakpoint.h: At global scope:  
DbgBreakpoint.h:51: non-member function `const char\* Description()' cannot have  
&nbsp;&nbsp;&nbsp;`const' method qualifier  
DbgBreakpoint.h: In function `const char\* Description()':  
DbgBreakpoint.h:51: `description' undeclared (first use this function)  
DbgBreakpoint.h: At global scope:  
DbgBreakpoint.h:53: parse error before `protected'  
DbgBreakpoint.h:63: 'Kind' is used as a type, but is not defined as a type.  
DbgBreakpoint.h:64: `bool enabled' used prior to declaration  
DbgBreakpoint.h:65: `bool temporary' used prior to declaration  
DbgBreakpoint.h:66: `int BPID' used prior to declaration  
DbgBreakpoint.h:68: `char description[512]' used prior to declaration  
DbgBreakpoint.h:69: 'string' is used as a type, but is not defined as a type.  
DbgBreakpoint.h:77: `int repeat\_count' used prior to declaration  
DbgBreakpoint.h:80: 'string' is used as a type, but is not defined as a type.  
DbgBreakpoint.h:81: parse error before `}' token  
In file included from Expr.h:31,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Event.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:33:  
Debug.h:42: syntax error before `;' token  
Debug.h:43: syntax error before `;' token  
Debug.h:93: 'BPIDMapType' is used as a type, but is not defined as a type.  
Debug.h:94: 'vector' is used as a type, but is not defined as a type.  
Debug.h:95: 'vector' is used as a type, but is not defined as a type.  
Debug.h:96: 'BPMapType' is used as a type, but is not defined as a type.  
Debug.h:141: parse error before `&' token  
Debug.h:177: parse error before `\*' token  
In file included from Event.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:33:  
Expr.h:532: 'string' is used as a type, but is not defined as a type.  
Expr.h: In member function `const char\* FieldAssignExpr::FieldName() const':  
Expr.h:526: `field\_name' undeclared (first use this function)  
In file included from Event.h:26,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:33:  
Func.h: At global scope:  
Func.h:46: ISO C++ forbids declaration of `vector' with no type  
Func.h:46: template-id `vector\<Stmt\*\>' used as a declarator  
Func.h:46: `vector' declared as a `virtual' field  
Func.h:46: parse error before `&' token  
Func.h: In constructor `Func::Func(FuncType\*)':  
Func.h:39: `t' undeclared (first use this function)  
Func.h:39: `scope' undeclared (first use this function)  
Func.h: At global scope:  
Func.h:49: ISO C++ forbids defining types within return type  
Func.h:49: syntax error before `\*' token  
Func.h:53: virtual outside class declaration  
Func.h:55: virtual outside class declaration  
Func.h:56: virtual outside class declaration  
Func.h:56: non-member function `Scope* GetScope()' cannot have `const' method  
&nbsp;&nbsp;&nbsp;qualifier  
Func.h:58: non-member function `BroType* FType()' cannot have `const' method  
&nbsp;&nbsp;&nbsp;qualifier  
Func.h:60: parse error before `protected'  
Func.h:62: `FuncType\*t' used prior to declaration  
Func.h:63: `Scope\*scope' used prior to declaration  
Func.h:64: parse error before `}' token  
In file included from main.cc:33:  
Event.h: In member function `void Event::Dispatch()':  
Event.h:43: no matching function for call to `Func::Call(val\_list\*&)'  
In file included from DFA.h:75,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:42:  
NFA.h:36:1: warning: "INFINITY" redefined  
In file included from /usr/include/math.h:40,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from PriorityQueue.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Timer.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Val.h:32,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from Frame.h:25,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from main.cc:31:  
/usr/include/bits/mathdef.h:35:1: warning: this is the location of the previous definition  
main.cc: In function `int main(int, char\*\*)':  
main.cc:188: `string' undeclared (first use this function)  
main.cc:188: parse error before `;' token  
main.cc:311: `active\_file' undeclared (first use this function)  
main.cc:440: `g\_frame\_stack' undeclared (first use this function)  
make: \*\*\* [main.o] Error 1

---

<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: [April 3, 2003, 4:49pm UTC](https://community.zeek.org/t/trouble-compile-bro-in-redhat-8-0/353/2 "2003-04-03T16:49:58Z")

</div>

Which gcc version do you use? Do you get similar errors with a  
recent 0.8\* version of Bro?

There were some incompatibilities with gcc \>= 3.0 (3.2?), but I  
think have been fixed (although I don't remember whether the changes  
have already been integrated into the latest version).

Robin

---

<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/trouble-compile-bro-in-redhat-8-0/353/3 "2022-05-06T15:36:43Z")

</div>


