[Snort-users] Newbie install Snort on a MacBook Pro with Maverick

Richard Harman Jr (rharmanj) rharmanj at ...589...
Thu Feb 13 19:16:31 EST 2014


Apple uses a different C compiler than what the Snort build environment expects.  Apple uses CLANG/LLVM, while Snort wants to be built using GCC.  I recently got a Macbook Pro and ran into the same problem.  Here’s how I fixed it.

You need GCC, and a whole bunch of other related utilities for compiling Snort, that don’t come with Xcode.  You can get the apps through macports, or brew, I personally use brew.  You can read how to download and install brew at http://brew.sh/.

This is the list of brew formulas I have installed:

autoconf	cloog018	daq		gmp4		libdnet		libtool		pcre
automake	 cvs		gcc49		isl011		libmpc08	mpfr2		pkg-config

You’ll also need to patch the Makefile that comes with Snort.  Find the line that has “-lSystemStubs” (that’s dash, lower case L, followed by SystemStubs), and remove “-lSystemStubs” entirely.

Then run configure and make.

Richard


> 
>> From: <litltbear at ...11827...>
>> Date: February 13, 2014 at 18:13:40 EST
>> To: <snort-users at lists.sourceforge.net>
>> Subject: [Snort-users] Newbie install Snort on a MacBook Pro with Maverick
>> 
>> I would really appreciate any help anyone ca give me.  I am trying to install Snort on my Mac with Maverick and everything goes ok until I run ‘make’ then
>> see below.  I have tried to search the net and don’t understand what anyone is saying.  Can someone please help me in simple terms?
>> 
>> Thank you
>> David
>> In file included from spo_alert_syslog.c:71:
>> ../../src/strlcatu.h:24:8: error: expected parameter declarator
>> size_t strlcat(char *, const char *, size_t);
>>        ^
>> /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
>>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^
>> /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                              ^
>> /usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
>> #    define _USE_FORTIFY_LEVEL 2
>>                                ^
>> In file included from spo_alert_syslog.c:71:
>> ../../src/strlcatu.h:24:8: error: expected ')'
>> /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
>>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^
>> /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                              ^
>> /usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
>> #    define _USE_FORTIFY_LEVEL 2
>>                                ^
>> ../../src/strlcatu.h:24:8: note: to match this '('
>> /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
>>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^
>> /usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                     ^
>> In file included from spo_alert_syslog.c:71:
>> ../../src/strlcatu.h:24:8: warning: type specifier missing, defaults to 'int'
>>       [-Wimplicit-int]
>> size_t strlcat(char *, const char *, size_t);
>>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
>>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^~~~~~~~~~~~~~~~~~~~
>> /usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                               ^~~~~~~~~~~~~~~~~~~~~
>> In file included from spo_alert_syslog.c:71:
>> ../../src/strlcatu.h:24:8: error: conflicting types for '__builtin___strlcat_chk'
>> /usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
>>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>>   ^
>> ../../src/strlcatu.h:24:8: note: '__builtin___strlcat_chk' is a builtin with type 'unsigned
>>       long (char *, const char *, unsigned long, unsigned long)'
>> /usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
>>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>>   ^
>> In file included from spo_alert_syslog.c:72:
>> ../../src/strlcpyu.h:24:8: error: expected parameter declarator
>> size_t strlcpy(char *, const char *, size_t);
>>        ^
>> /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
>>   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^
>> /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                              ^
>> /usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
>> #    define _USE_FORTIFY_LEVEL 2
>>                                ^
>> In file included from spo_alert_syslog.c:72:
>> ../../src/strlcpyu.h:24:8: error: expected ')'
>> /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
>>   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^
>> /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                              ^
>> /usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
>> #    define _USE_FORTIFY_LEVEL 2
>>                                ^
>> ../../src/strlcpyu.h:24:8: note: to match this '('
>> /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
>>   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^
>> /usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                     ^
>> In file included from spo_alert_syslog.c:72:
>> ../../src/strlcpyu.h:24:8: warning: type specifier missing, defaults to 'int'
>>       [-Wimplicit-int]
>> size_t strlcpy(char *, const char *, size_t);
>>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
>>   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
>>                                            ^~~~~~~~~~~~~~~~~~~~
>> /usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                               ^~~~~~~~~~~~~~~~~~~~~
>> In file included from spo_alert_syslog.c:72:
>> ../../src/strlcpyu.h:24:8: error: conflicting types for '__builtin___strlcpy_chk'
>> /usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
>>   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
>>   ^
>> ../../src/strlcpyu.h:24:8: note: '__builtin___strlcpy_chk' is a builtin with type 'unsigned
>>       long (char *, const char *, unsigned long, unsigned long)'
>> /usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
>>   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
>>   ^
>> 2 warnings and 6 errors generated.
>> make[3]: *** [spo_alert_syslog.o] Error 1
>> make[2]: *** [all-recursive] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Android apps run on BlackBerry 10
>> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
>> Now with support for Jelly Bean, Bluetooth, Mapview and more.
>> Get your Android app in front of a whole new audience.  Start now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> 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://sourceforge.net/mailarchive/forum.php?forum_name=snort-users
>> 
>> Please visit http://blog.snort.org to stay current on all the latest Snort news!





More information about the Snort-users mailing list