[Oisf-users] compile suricata 1.1 with gcc 4.1.2

Victor Julien victor at inliniac.net
Tue Nov 15 09:23:22 UTC 2011

On 11/15/2011 10:10 AM, David Cure wrote:
> 		Hello,
> 	I try to compile the last stable version with gcc 4.1.2 and I
> get these errors :
> gcc -DHAVE_CONFIG_H -I. -I..      -Wextra -Wall -fno-strict-aliasing
> -fno-tree-pre -Wno-unused-parameter -std=gnu99  -fstack-protector
> -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -DNFQ -DPRELUDE
> -MP -MF .deps/source-pcap.Tpo -c -o source-pcap.o source-pcap.c
> In file included from util-debug-filters.h:29,
>                  from util-debug.h:34,
>                  from suricata-common.h:200,
>                  from source-pcap.c:32:
> util-mem.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before 'engine_stage_sc_lock__'

It appears both support for atomic operations and spinlocks is missing
on your system and/or gcc version. This should still have worked with
Suricata, but it obviously didn't.

Easiest work around for you may be to install a more modern gcc. This
sounds dawning, but it really isn't.

1. download gcc: wget
2. unpack: tar zxvf gcc-4.6.2.tar.gz
3. cd gcc-4.6.2
4. ./configure --prefix=/opt/gcc-4.6.2
5. make
6. (sudo) make install

Then recompile Suricata:

CC=/opt/gcc-4.6.2/bin/gcc ./configure


Victor Julien
PGP: http://www.inliniac.net/victorjulien.asc

More information about the Oisf-users mailing list