Hi, Paul, > This looks okay to me. > > When you say you tried with the Sun compiler, did you try patching it > to fix any build problems, or were there to many or to hard-to-patch? CC would not work, I got following error while compiling with Sun compiler.
1st time: with latest released snort code. ---------------------------------------------------------------- <snip> cc -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../src -I../../../src/sfutil -I../../../src/output-plugins -I../../../src/detection-plugins -I../../../src/dynamic-plugins -I../../../src/preprocessors -I../../../src/preprocessors/flow -I../../../src/preprocessors/portscan -I../../../src/preprocessors/flow/int-snort -I../../../src/preprocessors/HttpInspect/include -I../../../src/preprocessors/Stream5 -I../../../src/target-based -DBSD_COMP -D_REENTRANT -I/usr/include/pcre -g -DDYNAMIC_PLUGIN -DDETECTION_OPTION_TREE -c snort_stream5_tcp.c "../../../src/rules.h", line 53: warning: macro redefined: INADDR_NONE "snort_stream5_tcp.c", line 2528: reference to static identifier "Stream5SeglistDeleteNode" in extern inline function "snort_stream5_tcp.c", line 3068: reference to static identifier "FlushStream" in extern inline function "snort_stream5_tcp.c", line 3080: reference to static identifier "DeleteSeglist" in extern inline function cc: acomp failed for snort_stream5_tcp.c *** Error code 2 make: Fatal error: Command failed for target `snort_stream5_tcp.o' Current working directory /export/home/Jason/work/pkgport/snort-2.8.3.1/src/preprocessors/Stream5 *** Error code 1 </snip> ---------------------------------------------------------------- I send to development mail list about the issue, and the maintainer of snort has accepted and will put it on their schedule. They suggested me to try latest development rc1 code, but there are still something un-compatible with CC. See following. 2nd time: with developing rc1 snort. ----------------------------------------------------------------- ...... /ws/onnv-tools-prc/SUNWspro/SS12/bin/cc -g -DDYNAMIC_PLUGIN -o snort codes.o debug.o decode.o log.o mstring.o parser.o profiler.o plugbase.o snort.o snprintf.o strlcatu.o strlcpyu.o tag.o util.o detect.o signature.o mempool.o sf_sdlist.o fpcreate.o fpdetect.o pcrm.o byte_extract.o sfthreshold.o packet_time.o event_wrapper.o event_queue.o inline.o ppm.o log_text.o -L/usr/lib output-plugins/libspo.a detection-plugins/libspd.a dynamic-plugins/libdynamic.a preprocessors/libspp.a parser/libparser.a target-based/libtarget_based.a preprocessors/HttpInspect/libhttp_inspect.a preprocessors/Stream5/libstream5.a sfutil/libsfutil.a -lpcre -lpcap -lm -lsocket -lnsl -ldl -R/usr/lib Undefined first referenced symbol in file CalcJiffies preprocessors/Stream5/libstream5.a(stream5_common.o) protocolRuleList preprocessors/Stream5/libstream5.a(stream5_common.o) SparseGetNextStateDFA sfutil/libsfutil.a(acsmx2.o) SparseGetNextStateNFA sfutil/libsfutil.a(acsmx2.o) ld: fatal: symbol referencing errors. No output written to snort *** Error code 1 make: Fatal error: Command failed for target `snort' Current working directory /export/home/Jason/work/pkgport/snort/snort-2.8.4.rc1/src ...... ----------------------------------------------------------------- When I checked the libsfutil.a, I found the symbols like SparseGetNextStateDFA are undefined. It is to say, the "acsmx2.o" could not be compiled well enough by sun studio compiler. # nm libsfutil.a | grep SparseGetNextStateDFA [82] | 0| 0|NOTY |GLOB |0 |UNDEF |SparseGetNextStateDFA # nm acsmx2.o | grep SparseGEtNextStateDFA # I am not sure how to fix it, and the question has been sent to developers of snort. Thanks Jason > > Paul > > Jason Zhao wrote: >> Hi, Paul, >>> Jason, >>> >>> Changes look good to me. See below for a couple of things I missed >>> first time around though ... >>> >>> Paul >>> >>> Jason Zhao wrote: >>> ... cut .. >>>> >>>> The new webrev is updated, please review it again and tell me your >>>> comments. >>>> http://cr.opensolaris.org/~jxzhao/snort/webrev >>> >>> 1. usr/src/cmd/Makefile >>> It looks as though this may need resyncing with the gate >>> as it looks as though you may be try to change stuff you >>> aren't really, ie. ... >>> -apr-util/apr-util-1.3: apr/apr-1.3 mysql-5-1 ... >>> +apr-util/apr-util-1.3: apr/apr-1.3 mysql-5-0 ... >>> & >>> -php5: apache2 mysql-5-1 postgres/postgresql-8.3 >>> +php5: apache2 mysql-5-0 postgres/postgresql-8.3 >> Thank you, I will sync with latest Makefile. >>> >>> 2. usr/src/cmd/snort/Makefile.sfw >>> You are building this with gcc, could it have been built >>> with the Sun compilers (the preferred compiler) ?? >> I tried with latest CC, it is still could not work so far. >> >> The webrev is updated according to James' and your comments. >> http://cr.opensolaris.org/~jxzhao/snort/webrev >>
