[GRASS-dev] FORTIFY_SOURCE=2 brakes congigure
Maciej Sieczka
msieczka at sieczka.org
Tue Apr 23 12:24:03 PDT 2013
W dniu 21.04.2013 23:08, Maciej Sieczka pisze:
> W dniu 21.04.2013 21:43, Markus Neteler pisze:
>> On Sun, Apr 21, 2013 at 8:23 PM, Maciej Sieczka <msieczka at sieczka.org>
>> /usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE
>> requires compiling with optimization (-O) [-Wcpp]
> Missed that. Thanks.
Wait a sec - but the default makepkg.conf *does* enable -O2 in CFLAGS
and CXXFLAGS [1]. So why would I have to set it in the CPPFLAGS too?
> `CPPFLAGS="-O -D_FORTIFY_SOURCE=2" ./configure' works. I don't like the
> idea of forcing the optimisation though. I think I'll rather override
> the Arch's default with -D_FORTIFY_SOURCE=0.
But thinking more about it, I find it hard to believe that Arch
developers would relase a makepkg.conf with
CPPFLAGS="-D_FORTIFY_SOURCE=2" enabled, knowing that it would brake
configure for lots of software. Haven't heard of any. Yet, for GRASS it
does brake it.
I have noticed GRASS's configure was generated with a very old autoconf
version (2.13, dated 1999). So I have run a mindeless `autoreconf
--force' (v. 2.69) for 6.4RC3. This has thrown severeal warnings [2],
but after that 6.4RC3 configures fine even with
CPPFLAGS="-D_FORTIFY_SOURCE=2". make fails miserably though.
To me this suggests that it might actually be the GRASS ancient
configure script at fault here, rather than Arch default build env
configuration. I know nothing about autotools, so maybe someone who
knows this stuff could give his opinion?
Maciek
[1]
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/makepkg.conf?h=packages/pacman#n32
[2] $ autoreconf --force
autoheader: warning: missing template: CURSES_MAXY
autoheader: Use AC_DEFINE([CURSES_MAXY], [], [Description])
autoheader: warning: missing template: HAVE_FFMPEG
autoheader: warning: missing template: HAVE_GDAL
autoheader: warning: missing template: HAVE_GEOS
autoheader: warning: missing template: HAVE_KEYPAD
autoheader: warning: missing template: HAVE_LARGEFILES
autoheader: warning: missing template: HAVE_LIBATLAS
autoheader: warning: missing template: HAVE_LIBBLAS
autoheader: warning: missing template: HAVE_LIBLAPACK
autoheader: warning: missing template: HAVE_LONG_LONG_INT
autoheader: warning: missing template: HAVE_OGR
autoheader: warning: missing template: HAVE_PBUFFERS
autoheader: warning: missing template: HAVE_PIXMAPS
autoheader: warning: missing template: HAVE_POSTGRES
autoheader: warning: missing template: HAVE_PQCMDTUPLES
autoheader: warning: missing template: HAVE_SOCKET
autoheader: warning: missing template: HAVE_SQLITE
autoheader: warning: missing template: HAVE_TCLTK
autoheader: warning: missing template: OPENGL_AQUA
autoheader: warning: missing template: OPENGL_WINDOWS
autoheader: warning: missing template: OPENGL_X11
autoheader: warning: missing template: PEEK_XCLOSEIM
autoheader: warning: missing template: STATIC_BUILD
autoheader: warning: missing template: USE_DELTA_FOR_TZ
autoheader: warning: missing template: USE_NLS
autoheader: warning: missing template: _OE_SOCKETS
autoheader: warning: missing template: _POSIX_PTHREAD_SEMANTICS
autoheader: warning: missing template: _REENTRANT
autoheader: warning: missing template: _XOPEN_SOURCE
autoheader: warning: missing template: _XOPEN_SOURCE_EXTENDED
autoreconf: /usr/bin/autoheader failed with exit status: 1
--
Maciej Sieczka
http://www.sieczka.org
More information about the grass-dev
mailing list