[Oisf-users] Suricata on OpenBSD

Mikael info at prowling.nu
Wed Jun 16 20:41:02 UTC 2010


That would of course be nice to have it officially supported, it seems
that "most" security related projects have gone all Ubuntu-ish and
forgotten all about OpenBSD, it may be for very good reasons ...

Will, if you have the time to continue looking into the things I
encounter you are more then welcome.

The util-byte.h edit solved the previous issue. But here is a new one

"
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I../libhtp   -I/usr/local/include/
-I/usr/local/include/libnet-1.1/  -g -O2 -W -Wall -fno-strict-aliasing
-Wno-unused-parameter -DHAVE_LIBNET11 -D_BSD_SOURCE -D__BSD_SOURCE
-D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DLIBPCAP_VERSION_MAJOR=0 -MT
util-debug.o -MD -MP -MF ".deps/util-debug.Tpo" -c -o util-debug.o
util-debug.c;  then mv -f ".deps/util-debug.Tpo" ".deps/util-debug.Po";
else rm -f ".deps/util-debug.Tpo"; exit 1; fi
util-debug.c: In function `SCLogMessage':
util-debug.c:349: warning: passing arg 1 of `localtime_r' from
incompatible pointer type
util-debug.c:379: error: `SYS_gettid' undeclared (first use in this
function)
util-debug.c:379: error: (Each undeclared identifier is reported only once
util-debug.c:379: error: for each function it appears in.)
*** Error code 1
"

/Micke


On 6/16/10 5:57 PM, Will Metcalf wrote:
> maybe we can look at adding support for OpenBSD a bit later for now I
> guess if you want to continue to hack together a compilation you can
> modify util-byte.h in the following manner...
> 
> from....
> 
> #else
> #include <byteswap.h>
> #define SCByteSwap16(x) bswap_16(x)
> #define SCByteSwap32(x) bswap_32(x)
> #define SCByteSwap64(x) bswap_64(x)
> #endif /* OS_FREEBSD */
> 
> to....
> 
> #else
> #include <sys/endian.h>
> #define SCByteSwap16(x) bswap16(x)
> #define SCByteSwap32(x) bswap32(x)
> #define SCByteSwap64(x) bswap64(x)
> #endif /* OS_FREEBSD */
> 
> 
> On Tue, Jun 15, 2010 at 2:48 PM, Mikael <info at prowling.nu> wrote:
>> Will,
>>
>> Sorry for my late reply.
>>
>> What you suggested solved the issue. I only removed "-Wextra"
>>
>> But I ran into some other troubles during the make process:
>>
>> "
>> if gcc -DHAVE_CONFIG_H -I. -I. -I..  -I../libhtp
>> -I/usr/loca/include/-I/usr/local/include/libnet-1.1/  -g -O2 -W -Wall
>> -fno-strict-aliasing -Wno-unused-parameter -DHAVE_LIBNET11 -D_BSD_SOURCE
>> -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H
>> -DLIBPCAP_VERSION_MAJOR=0 -MT suricata.o -MD -MP -MF
>> ".deps/suricata.Tpo" -c -o suricata.o suricata.c;  then mv -f
>> ".deps/suricata.Tpo" ".deps/suricata.Po"; else rm -f
>> ".deps/suricata.Tpo"; exit 1; fi
>> In file included from suricata.c:43:
>> util-byte.h:63:22: byteswap.h: No such file or directory
>> *** Error code 1
>> "
>>
>> This is probably because OpenBSD is not defined a supported OS and hence
>> the code tries to include byteswap.h that does not exist...
>>
>>
>> Regards
>> Mikael
>>
>>
>> On 6/7/10 7:41 PM, Will Metcalf wrote:
>>> Thats a pretty old version of gcc, but you can try to remove and
>>> unsupported flags from libhtp/htp/Makefile.am and then make clean and
>>> then ./autogen.sh && ./configure && make
>>>
>>> AM_CFLAGS = -D_GNU_SOURCE -g -O2 -Wall -Wextra -std=gnu99 -pedantic
>>>
>>> Regards,
>>>
>>> Will
>>>
>>> On Mon, Jun 7, 2010 at 12:31 PM, Mikael <info at prowling.nu> wrote:
>>>> Hi Will,
>>>>
>>>>
>>>> -------------
>>>> # gcc -v
>>>> Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.6/3.3.5/specs
>>>> Configured with:
>>>> Thread model: single
>>>> gcc version 3.3.5 (propolice)
>>>> -------------
>>>>
>>>> And yes it might be a RTFM case, as the doc said gcc 4.5.x for FreeBSD...
>>>>
>>>> /Mikael
>>>>
>>>>
>>>>
>>>> On 6/7/10 7:23 PM, Will Metcalf wrote:
>>>>> hmmm what version of gcc do you have?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Will
>>>>>
>>>>> On Mon, Jun 7, 2010 at 12:02 PM, Mikael <info at prowling.nu> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I just wanted to know if anyone has gotten Suricata / htp to work on
>>>>>> OpenBSD (4.6).
>>>>>>
>>>>>> I think I have gotten pretty close but the compilation of htp fails.. =)
>>>>>>
>>>>>> -------
>>>>>> # make
>>>>>> make  all-recursive
>>>>>> Making all in libhtp
>>>>>> CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh
>>>>>> /root/suricata-0.9.1/missing --run autoconf
>>>>>> Provide an AUTOCONF_VERSION environment variable, please
>>>>>> make  all-recursive
>>>>>> Making all in htp
>>>>>> cd .. && make  am--refresh
>>>>>> /bin/sh ../libtool --tag=CC    --mode=compile gcc -DHAVE_CONFIG_H -I.
>>>>>> -I.. -I. -I..    -D_GNU_SOURCE -g -O2 -Wall -Wextra -std=gnu99 -pedantic
>>>>>> -DHTP_DEBUG -MT bstr.lo -MD -MP -MF .deps/bstr.Tpo -c -o bstr.lo bstr.c
>>>>>> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -D_GNU_SOURCE
>>>>>> -g -O2 -Wall -Wextra -std=gnu99 -pedantic -DHTP_DEBUG -MT bstr.lo -MD
>>>>>> -MP -MF .deps/bstr.Tpo -c bstr.c  -fPIC -DPIC -o .libs/bstr.o
>>>>>> cc1: error: unrecognized option `-Wextra'
>>>>>> *** Error code 1
>>>>>>
>>>>>> Stop in /root/suricata-0.9.1/libhtp/htp (line 339 of Makefile).
>>>>>> *** Error code 1
>>>>>>
>>>>>> Stop in /root/suricata-0.9.1/libhtp (line 367 of Makefile).
>>>>>> *** Error code 1
>>>>>>
>>>>>> Stop in /root/suricata-0.9.1/libhtp (line 252 of Makefile).
>>>>>> *** Error code 1
>>>>>>
>>>>>> Stop in /root/suricata-0.9.1 (line 334 of Makefile).
>>>>>> *** Error code 1
>>>>>>
>>>>>> Stop in /root/suricata-0.9.1 (line 241 of Makefile)
>>>>>>
>>>>>> ------
>>>>>>
>>>>>> I can supply more info if needed.
>>>>>>
>>>>>>
>>>>>> /Mikael
>>>>>> _______________________________________________
>>>>>> Oisf-users mailing list
>>>>>> Oisf-users at openinfosecfoundation.org
>>>>>> http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
> 




More information about the Oisf-users mailing list