[Bro] Strange Bro build problem with yacc/bison

frenzy at frenzy.org frenzy at frenzy.org
Mon Dec 4 10:44:47 PST 2006


I am getting this on a FreeBSD 5.4 system also. It seems that
make_parser.pl is not getting called to interpret the parse.y file.
If I run 'make_parser.pl byacc' manually, then the build completes.

It's been awhile since I've played with autoconf/automake.

The conflict appears to be somewhere in the following two entries:

broparse.h parse.cc: parse.y
        $(YACC) $(YFLAGS) parse.y
        @sed '/extern char.*getenv/d;s/yylex/brolex/' <y.tab.c >parse.cc
        @mv y.tab.h broparse.h
        @rm y.tab.c

parse.y: parse.in make_parser.pl
        @rm -f parse.y
        perl -w $(srcdir)/make_parser.pl "$(YACC)"
        chmod -w parse.y

Thanks,

Randy

On Sat, 2 Dec 2006, Christian Kreibich wrote:

> On Fri, 2006-12-01 at 18:39 -0800, Vern Paxson wrote:
>> Yeah, we ran into this on a FreeBSD 6.1 machine too.  It wasn't clear
>> at the time whether it was a general 6.1 problem or unique to our 
build;
>> I guess now we know :-).
>>
>> I'm not sure what's the right autoconf goop to solve this - certainly
>> the current build failure isn't pretty.
>
> Such files should go into MOSTLYCLEANFILES. Try this:
>
> Index: Makefile.am
> ===================================================================
> --- Makefile.am (revision 3857)
> +++ Makefile.am (working copy)
> @@ -54,6 +54,10 @@
>        portmap-protocol.pac portmap-analyzer.pac \
>        rpc-protocol.pac rpc-analyzer.pac
>
> +YACC_OUTPUT = \
> +       bif_parse.h bif_parse.cc broparse.h parse.cc \
> +       re-parse.h re-parse.cc rule-parse.h rule-parse.cc
> +
> # this is better
> if USE_NBDNS
> dns_srcs = nb_dns.c
> @@ -161,8 +165,7 @@
> # Files created in the src dir.
> MOSTLYCLEANFILES = $(BIF_FUNC_H) $(BIF_FUNC_DEF) $(BIF_FUNC_INIT) \
>                   $(BIF_NETVAR_H) $(BIF_NETVAR_DEF) $(BIF_NETVAR_INIT) \
> -                  $(BRO_BIF) \
> -                  $(BINPAC_H) $(BINPAC_CC) \
> +                  $(BRO_BIF) $(BINPAC_H) $(BINPAC_CC) $(YACC_OUTPUT) \
>                   $(DISTCLEANFILES)
>
> Cheers,
> Christian.
> --
> ________________________________________________________________________
>                                          http://www.cl.cam.ac.uk/~cpk25
>                                                    http://www.whoop.org
>
> _______________________________________________
> Bro mailing list
> bro at bro-ids.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro
>






More information about the Bro mailing list