There can be an issue created by ambiguous use of 'yacc' instead of 'bison' when compiling the target-based modules in the Snort binary. If 'yacc' is used, then the resulting binary will fail to read Host Attributes table XML files. The code will report a fatal syntax error and exit even when the XML file is actually properly formatted. When 'bison' is used instead in the same builder environment, the resulting Snort binary will properly read the XML file for the Host Attributes table.
I was able to prevent this issue from happening by adding 'bison' to the USES= line in the Snort Makefile. This forces the compiler to use 'bison' during the build.
Suggest adding 'bison' to the USES= line in the Makefile as it appears the compilation process produces a faulty Snort binary when 'yacc' is used on FreeBSD. It seems 'yacc' can be the default in some FreeBSD build environments and will be used when no preference is specified in the Makefile.
A commit references this bug:
Date: Wed May 29 21:03:30 UTC 2019
New revision: 503015
- Explicitly depend on bison
- Bump PORTREVISION
Submitted by: Bill Meeks <firstname.lastname@example.org>