[Snort-devel] Compiling 1.8.4 under RHL 7.2

Bill McCarty bmccarty at ...1217...
Mon Mar 25 12:53:55 EST 2002


I've only just begun monitoring this list, so please forgive me if recent 
traffic has dealt with this issue.

Compilation of 1.8.4 under RHL 7.2 fails, owing to the following error:

gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/pcap  -I/usr/include  -g -O2
 -Wall -DDEBUG -ggdb -DENABLE_RESPONSE -D_BSD_SOURCE -D__BSD_SOURCE
 -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN -c snort.c
In file included from /usr/include/netinet/in.h:23,
                 from snort.h:43,
                 from snort.c:45:
/usr/include/stdint.h:49: redefinition of `uint8_t'
/usr/include/sys/types.h:196: `uint8_t' previously declared here
/usr/include/stdint.h:50: redefinition of `uint16_t'
/usr/include/sys/types.h:197: `uint16_t' previously declared here
/usr/include/stdint.h:52: redefinition of `uint32_t'
/usr/include/sys/types.h:198: `uint32_t' previously declared here
make[2]: *** [snort.o] Error 1
make[2]: Leaving directory `/root/snort-1.8.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/snort-1.8.4'
make: *** [all-recursive-am] Error 2

The problem is that Snort defines u_int8_t to uint8_t
before including the headers. Because /usr/include/sys/types.h 
unconditionally defines u_int8_t and because /usr/include/stdint.h 
unconditionally defines uint8_t, a type redefinition error results. 
Apparently, the configure script isn't quite right.

I've not played with configure scripts, so I can't easily provide a 
suggested fix. Sorry!

---------------------------------------------------
Bill McCarty




More information about the Snort-devel mailing list