[GRASS-dev] [GRASS GIS] #2916: configure bug (?): FORTIFY_SOURCE in CPPFLAGS breaks configure on Arch Linux
GRASS GIS
trac at osgeo.org
Wed Feb 17 09:21:38 PST 2016
#2916: configure bug (?): FORTIFY_SOURCE in CPPFLAGS breaks configure on Arch
Linux
------------------------+-------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Compiling | Version: 7.0.3
Resolution: | Keywords:
CPU: All | Platform: Linux
------------------------+-------------------------
Comment (by msieczka):
Replying to [comment:7 glynn]:
> Replying to [ticket:2916 msieczka]:
> > Arch Linux build system by default sets
CPPFLAGS="-D_FORTIFY_SOURCE=2".
> >
> > If I unset FORTIFY_SOURCE, configure and make passes. But when it's
set, configure in GRASS 6 and 7 fails.
>
> {{{
> configure:2722: checking how to run the C preprocessor
> configure:2741: gcc -E -D_FORTIFY_SOURCE=2 conftest.c >/dev/null
2>conftest.out
> In file included from /usr/include/assert.h:35:0,
> from configure:2736:
> /usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE
requires compiling with optimization (-O) [-Wcpp]
> # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> ^
> configure: failed program was:
> }}}
>
> This all arises because autoconf tends to treat ANYTHING written to
stderr as indicating a failure.
Thanks for the explanation. Do you know why this "_FORTIFY_SOURCE requires
compiling with optimization (-O)" warning is triggered? I think it
shouldn't be, because I do have optimization enabled in my build
environment:
{{{
$ grep '\-O' /etc/makepkg.conf
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
}}}
config.log-fail contents also reflect this.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2916#comment:10>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list