[Snort-users] Great difficulties compiling under Solaris 2.5.1
dzerkle at ...1512...
Thu Mar 8 13:29:22 EST 2001
I've been having assorted difficulties compiling under Solaris 2.5.1. We're
using this old OS on purpose, to meet customer compatibility requirements.
One problem is solved in a sloppy manner, and I'm still stuck on another. Can
This is Snort 1.7, as available on the Web site.
5.5.1 Generic_103640-32 sun4u sparc SUNW,Ultra-5_10
gcc -v says:
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/220.127.116.11/specs
gcc version 18.104.22.168
There is a compile problem. It won't. The problem starts with snort.c.
gcc -DHAVE_CONFIG_H -I. -I. -I. -DBSD_COMP -I../libpcap-0.4 -g -O2 -Wall -c
In file included from snort.h:45,
/usr/include/rpc/clnt.h:512: warning: `struct netbuf' declared inside
/usr/include/rpc/clnt.h:512: warning: its scope is only this definition or
/usr/include/rpc/clnt.h:512: warning: which is probably not what you want.
/usr/include/rpc/clnt.h:532: warning: `struct netbuf' declared inside
/usr/include/rpc/clnt.h:550: warning: `struct netbuf' declared inside
In file included from snort.h:74,
decode.h:342: parse error before `uint8_t'
decode.h:342: warning: no semicolon at end of struct or union
decode.h:343: warning: data definition has no type or storage class
decode.h:344: parse error before `protid'
decode.h:344: warning: data definition has no type or storage class
(...hundreds more error messages follow...)
The following code, inserted into snort.h before the includes, cleared up that
problem. Thanks to Pete Wilcoxen for the fix. Does anyone have a fix that
doesn't require messing with source code?
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
With or without this fix, snort won't get past the configure stage with
libpcap 0.6.2 (the newest). Mind you, it's fine with libpcap 0.4.
I put the libpcap directories in the same directory as the snort 1.7
directories, and did configures and makes right in there with no options.
This works fine:
$ ./configure --with-libpcap-includes=../libpcap-0.4
This does not work:
$ ./configure --with-libpcap-includes=../libpcap-0.6.2
(...lots of stuff deleted...)
checking for pcap_datalink in -lpcap... no
ERROR! Libpcap library/headers not found, go get it from
or use the --with-libpcap-* options, if you have it installed
in unusual place
Mind you, I'm using 0.6.2 with Linux, and it works perfectly there. Does
anyone have any idea what's going on here? How do I fix it so that I can
compile Snort 1.7 with libpcap 0.6.2 under Solaris 2.5.1?
Thanks for any help.
More information about the Snort-users