[Snort-devel] Compiling 1.8.4 under RHL 7.2

Michael.Slifcak at ...1192... Michael.Slifcak at ...1192...
Mon Mar 25 13:48:03 EST 2002


When building on RedHat, I run this little script before I run "configure":

grep u_int config.h.in >/dev/null 2>&1
if [ $? = 0 ] ; then
  grep -v u_int config.h.in > cx;mv cx config.h.in
fi

I trust it works for you, too.

Best Regards,
-Mike Slifcak, working at Guardent, Inc.

> -----Original Message-----
> From: Bill McCarty [mailto:bmccarty at ...1217...]
> Sent: Monday, March 25, 2002 3:39 PM
> To: snort-devel at lists.sourceforge.net
> Subject: [Snort-devel] Compiling 1.8.4 under RHL 7.2
> 
> 
> 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
> 
> _______________________________________________
> Snort-devel mailing list
> Snort-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/snort-devel
> 




More information about the Snort-devel mailing list