UPDATE:
Yay this is now fixed, seemed to be a fairly simple solution too. All good!
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/102922
A few days ago I went to upgrade snort to the latest version (from 2.4.5 to 2.6.0) and it failed at the 'make build' stage. I've just had a chance to look into the problem and it appears to be to do with the build of the dynamic rule processing functionality. A temporary workaround is to build snort with the '-DWITHOUT_DYNAMIC' flag on FreeBSD:
CODE:
cd /usr/ports/security/snort
make -DWITHOUT_DYNAMIC clean install
Hopefully a full fix will be found in the next few weeks. I'm about to submit a problem report (PR) once the maintainer's had a chance to look it over, I'll cc it to the snort-users mailing list as well in the hope someone there will have a better idea what the problem is.
The PR is included in the extended article.
>Submitter-Id: current-users
>Originator: Jez Hancock
>Organization: n/a
>Confidential: no
>Synopsis: Snort make build fails on FreeBSD 4.11
>Severity: critical
>Priority: medium
>Category: ports
>Class: sw-bug
>Release: FreeBSD 4.11-STABLE i386
>Environment: FreeBSD users.munk.me.uk 4.11-STABLE FreeBSD 4.11-STABLE #0:=
Thu Apr 27 02:47:55 BST 2006 root@users.munk.nu:/usr/obj/usr/src/sys/MUNKB=
OXEN i386
>Description:
Build of snort 2.6.0 fails on FreeBSD 4.11. Seems to be a problem
building the dynamic-rule target(?) 'all-am' - make build is successful
when run with the -DWITHOUT_DYNAMIC flag on FreeBSD 4.11.
Output of errors listed below:
[18:18:10] root@users /home/munk/ports/security/snort#=1B[105C ; make build
=3D=3D=3D> Building for snort-2.6.0
make all-recursive
Making all in src
Making all in dynamic-rule
cp ../include/sfsnort_dynamic_detection_lib.c sfsnort_dynamic_detection_lib=
=2Ec
cp ../include/sfsnort_dynamic_detection_lib.h sfsnort_dynamic_detection_lib=
=2Eh
make all-am
/bin/sh /usr/local/bin/libtool --mode=3Dcompile --tag=3DCC cc -DHAVE_CONFIG=
_H -I. -I. -I../../.. -I../include -I/usr/local/include -I/usr/local/incl=
ude/mysql -DENABLE_MYSQL -O -pipe -Wall -DDYNAMIC_PLUGIN -c -o sfsnort_dy=
namic_detection_lib.lo sfsnort_dynamic_detection_lib.c
mkdir .libs
cc -DHAVE_CONFIG_H -I. -I. -I../../.. -I../include -I/usr/local/include -I=
/usr/local/include/mysql -DENABLE_MYSQL -O -pipe -Wall -DDYNAMIC_PLUGIN -c =
sfsnort_dynamic_detection_lib.c -fPIC -DPIC -o .libs/sfsnort_dynamic_detec=
tion_lib.o
In file included from ../include/sf_snort_plugin_api.h:39,
from sfsnort_dynamic_detection_lib.c:2:
/usr/include/netinet/in.h:235: syntax error before `in_addr_t'
/usr/include/netinet/in.h:287: syntax error before `u_char'
In file included from /usr/include/netinet/in.h:493,
from ../include/sf_snort_plugin_api.h:39,
from sfsnort_dynamic_detection_lib.c:2:
/usr/include/netinet6/in6.h:122: syntax error before `u_int8_t'
/usr/include/netinet6/in6.h:144: syntax error before `u_int8_t'
/usr/include/netinet6/in6.h:149: syntax error before `u_int32_t'
/usr/include/netinet6/in6.h:612: syntax error before `*'
/usr/include/netinet6/in6.h:613: warning: type defaults to `int' in declara=
tion of `inet6_option_append'
/usr/include/netinet6/in6.h:614: syntax error before `*'
/usr/include/netinet6/in6.h:614: warning: type defaults to `int' in declara=
tion of `inet6_option_alloc'
/usr/include/netinet6/in6.h:614: warning: data definition has no type or st=
orage class
/usr/include/netinet6/in6.h:615: syntax error before `u_int8_t'
/usr/include/netinet6/in6.h:616: syntax error before `u_int8_t'
/usr/include/netinet6/in6.h:631: syntax error before `u_int8_t'
/usr/include/netinet6/in6.h:636: syntax error before `u_int8_t'
/usr/include/netinet6/in6.h:638: syntax error before `u_int8_t'
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0/src/dynamic-exampl=
es/dynamic-rule.
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0/src/dynamic-exampl=
es/dynamic-rule.
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0/src/dynamic-exampl=
es.
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0/src/dynamic-exampl=
es.
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0/src.
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0.
*** Error code 1
Stop in /home/munk/ports/security/snort/work/snort-2.6.0.
*** Error code 1
Stop in /home/munk/ports/security/snort.
>How-To-Repeat:
cvsup to latest ports tree.
cd /usr/ports/security/snort
make clean build
>Fix:
Temporary workaround for users who don't require dynamic rule
functionality as mentioned above is to pass -DWITHOUT_DYNAMIC flag to
make:
cd /usr/ports/security/snort
make -DWITHOUT_DYNAMIC clean install