[Bro] Strange Bro build problem with yacc/bison

Stephen Lau stephen.lau at ucsf.edu
Fri Dec 1 16:20:31 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I attempted to compile Bro 1.2 on a FreeBSD 6.1 box with yacc installed
and Bro complained of the following:

========
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I. -I../src/binpac/lib -I../src
- -I. -I.. -Ilibedit   -O -W -Wall -Wno-unused   -g -O2 -MT parse.o -MD
- -MP -MF "                      .deps/parse.Tpo" -c -o parse.o parse.cc;
 then mv -f ".deps/parse.Tpo" ".deps/parse.Po"; else rm -f
".deps/parse.Tpo"; exit 1; fi
parse.y: In function `int yyparse()':
parse.y:184: error: stray '@' in program
parse.y:184: error: stray '@' in program
parse.y:184: error: no matching function for call to `set_location(int,
int)'
Obj.h:94: note: candidates are: void set_location(Location)
Obj.h:99: note:                 void set_location(Location, Location)
parse.y:190: error: stray '@' in program
parse.y:190: error: stray '@' in program
parse.y:190: error: no matching function for call to `set_location(int,
int)'
Obj.h:94: note: candidates are: void set_location(Location)
Obj.h:99: note:                 void set_location(Location, Location)
parse.y:196: error: stray '@' in program
parse.y:196: error: stray '@' in program
parse.y:196: error: no matching function for call to `set_location(int,
int)'
Obj.h:94: note: candidates are: void set_location(Location)
Obj.h:99: note:                 void set_location(Location, Location)
parse.y:202: error: stray '@' in program
parse.y:202: error: stray '@' in program
parse.y:202: error: no matching function for call to `set_location(int,
int)'
Obj.h:94: note: candidates are: void set_location(Location)
Obj.h:99: note:                 void set_location(Location, Location)
parse.y:208: error: stray '@' in program
parse.y:208: error: stray '@' in program
parse.y:208: error: no matching function for call to `set_location(int,
int)'
Obj.h:94: note: candidates are: void set_location(Location)
Obj.h:99: note:                 void set_location(Location, Location)
parse.y:214: error: stray '@' in program
parse.y:214: error: stray '@' in program
=========

I installed bison, did a make distclean and recompiled and it
still came up with this same error.

I manually removed parse.cc, did a make and it compiled fine.

It looks like there's a slight bug in the Makefile under src.

distclean-compile:
        -rm -f *.tab.c

This should probably be changed to parse.cc or something to ensure
that the bison outputted file gets removed on a clean.

I don't know why Yacc disliked it, but it seems to work under bison
properly.

Steve

- --
+---------------------------------------------------------------------
Stephen Lau - Stephen.Lau at ucsf.edu
Information Security Policy and Program Manager
University of California, San Francisco
1855 Folsom, Suite 602, Box 0707, San Francisco, CA 94143
+1(415) 476-3106 (Work) +1(415) 476-1717 (Fax)
PGP: 44C8 C9CB C15E 2AE1 7B0A 544E 9A04 AB2B F63F 748B
+---------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFFcMbNmgSrK/Y/dIsRApwZAJwJMwnnuiCF3jVjt8JEwIRbrPT/IwCff7+7
04uW/tD5RGBdwqiIJAhnOXc=
=zSJZ
-----END PGP SIGNATURE-----




More information about the Bro mailing list