[Oisf-users] Odd build error on hardened-gentoo
Cooper F. Nelson
cnelson at ucsd.edu
Tue Oct 15 20:44:09 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've found two fixes for this:
Either explicitly set _FORTIFY_SOURCE=2 during the configure process:
> CPPFLAGS=-D_FORTIFY_SOURCE=2 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-geoip
... or comment out all references to it in the config.ac files and
suricata.c.
The first method still produces errors about it being redefined, but the
code at least compiles.
- -Coop
On 10/14/2013 4:12 AM, Victor Julien wrote:
>
> That line looks like this:
>
> printf("compiled with _FORTIFY_SOURCE=%d\n", _FORTIFY_SOURCE);
>
> as part of a block:
>
> #ifdef _FORTIFY_SOURCE
> printf("compiled with _FORTIFY_SOURCE=%d\n", _FORTIFY_SOURCE);
> #endif
>
> printf shouldn't be the problem, as it was called before this line as
> well, so I think something happened to the definition of _FORTIFY_SOURCE.
>
> It's expected to contain a simple int value, but maybe in this case
> it's defined very differently.
>
> We can try to figure this out by invoking the C preprocessor directly:
>
> $ cpp src/suricata.c -I/opt/htp-0.5.x/include/ -I. -I/usr/include/nss/
> -I/usr/include/nspr/|grep _FORTIFY_SOURCE
> In file included from src/suricata.c:24:0:
> src/suricata-common.h:44:2: warning: #warning "L1 cache line size not
> detected during build. Assuming 64 bytes." [-Wcpp]
> printf("compiled with _FORTIFY_SOURCE=%d\n", 2);
>
> So in my case _FORTIFY_SOURCE is defined as 2.
>
> Can you try this as well and post the results? You may have to adapt
> the -I options to include your own "include" paths. cpp will error out
> if you get them wrong.
>
> _______________________________________________
> Suricata IDS Users mailing list: oisf-users at openinfosecfoundation.org
> Site: http://suricata-ids.org | Support: http://suricata-ids.org/support/
> List: https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users
> OISF: http://www.openinfosecfoundation.org/
>
- --
Cooper Nelson
Network Security Analyst
UCSD ACT Security Team
cnelson at ucsd.edu x41042
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSXakYAAoJEKIFRYQsa8FWoO8H/0htVrGoczzaiqZVYppYoLXF
PtwSm/3ZcGuOG9DZ+SIo7CbYsUVphKp/UfSQtpIkEJ0wiXYgUHuT7ZPkXTbIAS3s
QIA7c8xtBfLziTm1QSEl4gH4cnu+tNg0XVBZPWSfblRyQqqG7hf/qPMZC95tWXOT
GRzE1Iu5Wswi1pDWZ7hnaqu0eA5cybSrLMonIdDvMZE7vw9JmV7YEIEiNI14TArk
5j9236AnlL4sit5r5hRVNjoZfkOCznylvGqJN5HSCG4J/bqQEwXdKbjyEfEkHyV1
jmOnrdjeL4jcz3w+8rtN1mdsa2cvHkixr4pqhfgGRUNMRFCi79X8lTCCdYy0vs4=
=VXeR
-----END PGP SIGNATURE-----
More information about the Oisf-users
mailing list