Snort mailing list archives

Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use?


From: Todd Wease <twease () sourcefire com>
Date: Tue, 23 Dec 2008 07:49:52 -0500

Hi Ian,

Can you try the attached patch and let us know if it fixes the compile
error?

$ cp mac1028.diff snort-2.8.3.1
$ cd snort-2.8.3.1
$ patch -p0 < mac1028.diff
$ libtoolize --automake --copy
$ aclocal -I m4
$ autoheader
$ automake --add-missing --copy
$ autoconf
$ ./configure <your-configure-options>
$ make

Thanks,
Todd


Ian Masters wrote:
Nerijus, Keith, Joel

Thanks for the replies and helpful information

  
Read the INSTALL file till the end. It has some tips for building
snort under OS X.
    

Thanks. I've now done that. I tried adding the extra commands:
glibtoolize --force
aclocal -I m4
autoheader
automake --add-missing --copy
autoconf
$ export LD_TWOLEVEL_NAMESPACE=1

but the decode.h error still appears.

  
$ export LD_TWOLEVEL_NAMESPACE=1
$ export MACOSX_DEPLOYMENT_TARGET=10.5  -(change 10.5 to your OS version)
    

That didn't make any difference either.

  
10.2.8?  You can't upgrade beyond that?  That's not even supported by
Apple anymore, afaik.  I know we support 10.4 and 10.5 with Snort.
    

Unfortunately upgrading is unlikely. If it's impossible to run snort
2.8.3.1 on OSX 10.2.8, that's OK. I just need to know so that I can
think about other options.

If anyone from the ML or Sourcefire can confirm that, it would be very
useful.

Thanks people for the help. Much appreciated.

Ian



------------------------------------------------------------------------------
_______________________________________________
Snort-users mailing list
Snort-users () 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
  

? bnfa.diff
? cflags.out
? dce.diff
? dce2.diff
? last.diff
? log
? out
? rules.work
? ylwrap
? etc/bugged.rules
? etc/snort.conf.bugged
? etc/snort.conf.work
? src/.sf_types.h.swp
? src/out
? src/dynamic-preprocessors/dcerpc2/out
? src/sfutil/acsmx2.o.Sn1ECI
Index: configure.in
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/configure.in,v
retrieving revision 1.112
diff -p -u -r1.112 configure.in
--- configure.in        15 Dec 2008 22:43:37 -0000      1.112
+++ configure.in        22 Dec 2008 15:11:09 -0000
@@ -134,18 +134,15 @@ case "$host" in
     ;;
   *-aix*)
     AC_DEFINE(AIX,,[Define if AIX])
-     broken_types=yes
     ;;
   *-osf4*)
     AC_DEFINE(OSF1,,[Define if OSF1])
-    tru64_types=yes
     ;;
   *-osf5.1*)
     AC_DEFINE(OSF1)
     ;;
   *-tru64*)
     AC_DEFINE(OSF1)
-    tru64_types=yes
     ;;
 # it is actually <platform>-apple-darwin1.2 or <platform>-apple-rhapsody5.x but lets stick with this for the moment    
   *-apple*)
@@ -1482,21 +1479,8 @@ fi
 #    fi
 #fi
 
-if test "$tru64_types" = "yes"; then
-        AC_CHECK_TYPE(u_int8_t, unsigned char)
-        AC_CHECK_TYPE(u_int16_t, unsigned short)
-        AC_CHECK_TYPE(u_int32_t, unsigned int)
-else
-       if test "$broken_types" = "yes" ; then
-               AC_CHECK_TYPE(u_int8_t, unsigned char)
-               AC_CHECK_TYPE(u_int16_t, unsigned short)
-               AC_CHECK_TYPE(u_int32_t, unsigned long int)
-       else
-               AC_CHECK_TYPE(u_int8_t, uint8_t)
-               AC_CHECK_TYPE(u_int16_t, uint16_t)
-               AC_CHECK_TYPE(u_int32_t, uint32_t)
-       fi
-fi
+# Check for int types
+AC_CHECK_TYPES([u_int8_t,u_int16_t,u_int32_t,uint8_t,uint16_t,uint32_t])
 
 # let's make some fixes..
 
Index: src/sf_types.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/sf_types.h,v
retrieving revision 1.8
diff -p -u -r1.8 sf_types.h
--- src/sf_types.h      19 Sep 2008 13:20:51 -0000      1.8
+++ src/sf_types.h      22 Dec 2008 15:11:09 -0000
@@ -31,25 +31,64 @@
 #include "stdint.h"
 #include "inttypes.h"
 #else
-#ifdef HAVE_INTTYPES_H
+/* Autoconf uses <sys/types.h>, <inttypes.h> and <stdint.h> as standard includes for
+ * determining if these exist so there shouldn't be any typedef conflicts with
+ * including <sys/types.h>, <inttypes.h> or <stdint.h> since these would be
+ * defined already */
+# if !defined(HAVE_UINT8_T) || !defined(HAVE_U_INT8_T)
+#  if !defined(HAVE_UINT8_T) && !defined(HAVE_U_INT8_T)
+typedef unsigned char uint8_t
+typedef unsigned char u_int8_t
+#  elif defined(HAVE_UINT8_T)
+typedef uint8_t u_int8_t
+#  else
+typedef u_int8_t uint8_t
+#  endif  /* !defined(HAVE_UINT8_T) && !defined(HAVE_U_INT8_T) */
+# endif  /* !defined(HAVE_UINT8_T) || !defined(HAVE_U_INT8_T) */
+# if !defined(HAVE_UINT16_T) || !defined(HAVE_U_INT16_T)
+#  if !defined(HAVE_UINT16_T) && !defined(HAVE_U_INT16_T)
+typedef unsigned short uint16_t
+typedef unsigned short u_int16_t
+#  elif defined(HAVE_UINT16_T)
+typedef uint16_t u_int16_t
+#  else
+typedef u_int16_t uint16_t
+#  endif  /* !defined(HAVE_UINT16_T) && !defined(HAVE_U_INT16_T) */
+# endif  /* !defined(HAVE_UINT16_T) || !defined(HAVE_U_INT16_T) */
+# if !defined(HAVE_UINT32_T) || !defined(HAVE_U_INT32_T)
+#  if !defined(HAVE_UINT32_T) && !defined(HAVE_U_INT32_T)
+#   ifdef AIX
+typedef unsigned long int uint32_t
+typedef unsigned long int u_int32_t
+#   else
+typedef unsigned int uint32_t
+typedef unsigned int u_int32_t
+#   endif  /* AIX */
+#  elif defined(HAVE_UINT32_T)
+typedef uint32_t u_int32_t
+#  else
+typedef u_int32_t uint32_t
+#  endif  /* !defined(HAVE_UINT32_T) && !defined(HAVE_U_INT32_T) */
+# endif  /* !defined(HAVE_UINT32_T) || !defined(HAVE_U_INT32_T) */
+# ifdef HAVE_INTTYPES_H
+/* <inttypes.h> includes <stdint.h> */
 #include <inttypes.h>
-#elif HAVE_STDINT_H
+# elif HAVE_STDINT_H
 #include <stdint.h>
-#else
+# else
 /* Solaris - if inttypes.h is present, it should bring this in */
-#ifndef SYS_INT_TYPES_H
-#if defined(_LP64) || defined(_I32LPx)
+#  ifndef SYS_INT_TYPES_H
+#   if defined(_LP64) || defined(_I32LPx)
 typedef long int           intptr_t;
 typedef unsigned long int  uintptr_t;
-#else
+#   else
 typedef int           intptr_t;
 typedef unsigned int  uintptr_t;
-#endif  /* defined(_LP64) || defined(_I32LPx) */
-#endif  /* SYS_INT_TYPES_H */
-#endif  /* HAVE_INTTYPES_H elseif HAVE_STDINT_H */
+#   endif  /* defined(_LP64) || defined(_I32LPx) */
+#  endif  /* SYS_INT_TYPES_H */
+# endif  /* HAVE_INTTYPES_H elseif HAVE_STDINT_H */
 #endif  /* WIN32 */
 
-
 #ifndef UINT64
 #ifdef ULONGIS64BIT
 #define UINT64 unsigned long
------------------------------------------------------------------------------
_______________________________________________
Snort-users mailing list
Snort-users () 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

Current thread: