bro and FreeBSD 5.0

Jon Dugan jdugan at ncsa.uiuc.edu
Fri Feb 7 18:14:08 PST 2003


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

g++ -I. -Ilibedit -O  -c DebugCmds.cc
In file included from /usr/include/g++/backward/map.h:59,
                 from Type.h:29,
                 from ID.h:25,
                 from Expr.h:28,
                 from Debug.h:25,
                 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 
   char**)':
DebugCmds.cc:164: invalid conversion from `const char*' to `unsigned int'
DebugCmds.cc:164:   initializing argument 1 of `int std::basic_string<_CharT, 
   _Traits, _Alloc>::compare(_Alloc::size_type, _Alloc::size_type, const 
   _CharT*) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc 
   = 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, 
   _Traits, _Alloc>::compare(_Alloc::size_type, _Alloc::size_type, const 
   _CharT*) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc    = std::allocator<char>]'
*** Error code 1

  I can't seem to get it to find the hash<> templates.

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

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

Jon
-- 
Jon Dugan             |  Senior Network Engineer, NCSA Network Research
jdugan at ncsa.uiuc.edu  |  269 CAB, 605 E Springfield, Champaign, IL 61820
217-244-7715          |  http://www.ncsa.uiuc.edu/~jdugan/
-------------- next part --------------
diff -rc bro-pub-0.8a20/Active.cc bro-pub-0.8a20.orig/Active.cc
*** bro-pub-0.8a20/Active.cc	Fri Feb  7 16:58:35 2003
--- bro-pub-0.8a20.orig/Active.cc	Thu Oct 31 23:29:27 2002
***************
*** 9,15 ****
  
  #include <arpa/inet.h>
  
! #include <backward/hash_map.h>
  
  #include "Active.h"
  #include "util.h"
--- 9,15 ----
  
  #include <arpa/inet.h>
  
! #include <hash_map>
  
  #include "Active.h"
  #include "util.h"
diff -rc bro-pub-0.8a20/Anon.h bro-pub-0.8a20.orig/Anon.h
*** bro-pub-0.8a20/Anon.h	Fri Feb  7 16:59:13 2003
--- bro-pub-0.8a20.orig/Anon.h	Fri Oct 25 23:16:11 2002
***************
*** 12,18 ****
  #ifndef anon_h
  #define anon_h
  
! #include <backward/vector.h>
  #include "net_util.h"
  
  enum anonymization_method_t {
--- 12,18 ----
  #ifndef anon_h
  #define anon_h
  
! #include <vector>
  #include "net_util.h"
  
  enum anonymization_method_t {
diff -rc bro-pub-0.8a20/Debug.cc bro-pub-0.8a20.orig/Debug.cc
*** bro-pub-0.8a20/Debug.cc	Fri Feb  7 17:01:33 2003
--- bro-pub-0.8a20.orig/Debug.cc	Sun Oct 27 12:51:50 2002
***************
*** 9,15 ****
  
  #include <string>
  using namespace std;
- #include <bits/localefwd.h>
  
  #ifdef HAVE_READLINE
  #include <readline/readline.h>
--- 9,14 ----
diff -rc bro-pub-0.8a20/Type.h bro-pub-0.8a20.orig/Type.h
*** bro-pub-0.8a20/Type.h	Fri Feb  7 16:57:20 2003
--- bro-pub-0.8a20.orig/Type.h	Fri Oct 18 11:08:23 2002
***************
*** 26,32 ****
  #include "Attr.h"
  #include "BroList.h"
  #include "Dict.h"
! #include <backward/map.h>
  
  // BRO types.
  
--- 26,32 ----
  #include "Attr.h"
  #include "BroList.h"
  #include "Dict.h"
! #include <map>
  
  // BRO types.
  
diff -rc bro-pub-0.8a20/builtin-func.y bro-pub-0.8a20.orig/builtin-func.y
*** bro-pub-0.8a20/builtin-func.y	Fri Feb  7 16:56:17 2003
--- bro-pub-0.8a20.orig/builtin-func.y	Fri Oct 18 11:08:43 2002
***************
*** 1,5 ****
  %{
! #include <backward/vector.h>
  #include <stdio.h>
  #include <stdlib.h>
  
--- 1,5 ----
  %{
! #include <vector>
  #include <stdio.h>
  #include <stdlib.h>
  


More information about the Bro mailing list