[Snort-users] snort-2.8.4 still could not be built by Sun Studio Compiler

Matt Watchinski mwatchinski at ...1935...
Thu Apr 16 09:27:24 EDT 2009


Snort only supports gcc,  there are number of things that the Sun
Studio compiler doesn't like specifically inline function declarations
and "//" comments in older Sun CC versions.    My suggestion would be
to install gcc it should work with that.

Adding something like the following to the following files might fix it for you.

src/sfutil/acsmx2.c:
acstate_t SparseGetNextStateNFA(acstate_t *, acstate_t, unsigned);
acstate_t SparseGetNextStateDFA(acstate_t *, acstate_t, unsigned);

src/preprocessors/spp_portscan2.c:
void AddTargetPort(ScanTarget, u_int16_t, Packet);

There might be other problems though.

Cheers,
-matt

On Thu, Apr 16, 2009 at 6:30 AM, Jason Zhao <Jason.Zhao at ...5661...> wrote:
> Hi, experts,
>
> On snort-2.8.3.2, I tried to build snort by Sun Studio
> CC Compiler, but it failed. And I was advised that
> snort-2.8.4 could work. But I tried it today, and it is
> still failed when link to the snort binary. So I trigger
> the issue again here.
>
> Here is the log, please experts try it and tell me how
> to solve the issue.
>
> ------------------------------------------------
> ......
> /ws/onnv-tools-prc/SUNWspro/SS12/bin/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/portscan
> -I../src/preprocessors/HttpInspect/include
> -I../src/preprocessors/Stream5 -I../src/target-based -DBSD_COMP
> -D_REENTRANT -I/usr/include/pcre -g -DDYNAMIC_PLUGIN -c log_text.c
> /bin/sh ../libtool --tag=CC --mode=link
> /ws/onnv-tools-prc/SUNWspro/SS12/bin/cc -g -DDYNAMIC_PLUGIN -L/usr/lib
> -R/usr/lib -lpcre -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
> 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 -ldl -lpcre -lpcap
> -lm -lsocket -lnsl -ldl
> mkdir .libs
> /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/src
> *** Error code 1
> The following command caused the error:
> failcom='exit 1'; \
> for f in x $MAKEFLAGS; do \
> case $f in \
> *=* | --[!k]*);; \
> *k*) failcom='fail=yes';; \
> esac; \
> done; \
> dot_seen=no; \
> target=`echo all-recursive | sed s/-recursive//`; \
> list='sfutil win32 output-plugins detection-plugins dynamic-plugins
> preprocessors parser dynamic-preprocessors target-based
> dynamic-examples'; for subdir in $list; do \
> echo "Making $target in $subdir"; \
> if test "$subdir" = "."; then \
> dot_seen=yes; \
> local_target="$target-am"; \
> else \
> local_target="$target"; \
> fi; \
> (cd $subdir && make $local_target) \
> || eval $failcom; \
> done; \
> if test "$dot_seen" = "no"; then \
> make "$target-am" || exit 1; \
> fi; test -z "$fail"
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory
> /export/home/Jason/work/pkgport/snort/snort-2.8.4/src
> *** Error code 1
> The following command caused the error:
> failcom='exit 1'; \
> for f in x $MAKEFLAGS; do \
> case $f in \
> *=* | --[!k]*);; \
> *k*) failcom='fail=yes';; \
> esac; \
> done; \
> dot_seen=no; \
> target=`echo all-recursive | sed s/-recursive//`; \
> list='src doc etc templates contrib schemas rpm m4 preproc_rules'; for
> subdir in $list; do \
> echo "Making $target in $subdir"; \
> if test "$subdir" = "."; then \
> dot_seen=yes; \
> local_target="$target-am"; \
> else \
> local_target="$target"; \
> fi; \
> (cd $subdir && make $local_target) \
> || eval $failcom; \
> done; \
> if test "$dot_seen" = "no"; then \
> make "$target-am" || exit 1; \
> fi; test -z "$fail"
> make: Fatal error: Command failed for target `all-recursive'
> Current working directory /export/home/Jason/work/pkgport/snort/snort-2.8.4
> *** Error code 1
> make: Fatal error: Command failed for target `all'
> ------------------------------------------------
>
> Thanks
> Jason
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Snort-users mailing list
> Snort-users at lists.sourceforge.net
> Go to this URL to change user options or unsubscribe:
> https://lists.sourceforge.net/lists/listinfo/snort-users
> Snort-users list archive:
> http://www.geocrawler.com/redir-sf.php3?list=snort-users
>



-- 
Matthew Watchinski
Sr. Director Vulnerability Research Team (VRT)
Sourcefire, Inc.
Office: 410-423-1928
http://vrt-sourcefire.blogspot.com && http://www.snort.org/vrt/




More information about the Snort-users mailing list