[Oisf-users] Suricata on OpenBSD

Will Metcalf william.metcalf at gmail.com
Wed Jun 16 15:57:31 UTC 2010


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