After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778495 - epiphany-3.20.7 fails to build with gcc-4.9 (due to 'for' loop initial declarations)
epiphany-3.20.7 fails to build with gcc-4.9 (due to 'for' loop initial declar...
Status: RESOLVED WONTFIX
Product: epiphany
Classification: Core
Component: Build
3.20.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-11 14:42 UTC by Pacho Ramos
Modified: 2017-04-06 20:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pacho Ramos 2017-02-11 14:42:17 UTC
This is a regression over 3.20.6
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../lib -I./history -DSHARE_DIR=\"/usr/share/epiphany\" -DGETTEXT_PACKAGE=\"epiphany\" -DLOCALEDIR=\"/usr/share/locale\"   -pthread -D_REENTRANT -I/usr/include/gtk-3.0/unix-print -I/usr/include/libwnck-3.0 -I/usr/include/startup-notification-1.0 -I/usr/include/webkitgtk-4.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/libsecret-1 -I/usr/include/gnome-desktop-3.0 -I/usr/include/gcr-3 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gcr-3 -I/usr/include/gck-1 -I/usr/include/p11-kit-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gsettings-desktop-schemas  -fno-strict-aliasing -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default -Wno-deprecated-declarations -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=deprecated-declarations -march=native -pipe -O2 -ggdb -c -o ephy_profile_migrator-ephy-profile-migrator.o `test -f 'ephy-profile-migrator.c' || echo './'`ephy-profile-migrator.c
ephy-profile-migrator.c: In function 'migrate_insecure_passwords':
ephy-profile-migrator.c:1076:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (GList *l = items; l != NULL; l = l->next)
   ^
ephy-profile-migrator.c:1076:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
make[4]: *** [Makefile:923: ephy_profile_migrator-ephy-profile-migrator.o] Error 1
make[4]: Leaving directory '/var/tmp/portage/www-client/epiphany-3.20.7/work/epiphany-3.20.7/lib'
make[3]: *** [Makefile:959: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/www-client/epiphany-3.20.7/work/epiphany-3.20.7/lib'
make[2]: *** [Makefile:579: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/www-client/epiphany-3.20.7/work/epiphany-3.20.7/lib'
make[1]: *** [Makefile:487: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/www-client/epiphany-3.20.7/work/epiphany-3.20.7'
make: *** [Makefile:419: all] Error 2
Comment 1 Michael Catanzaro 2017-02-11 15:35:57 UTC
Good to know, thanks for reporting. You'll have to build it with CFLAGS="--std=gnu11". I know it's a bit awkward that this isn't handled by the build system. If someone wants to add an AX_C_COMPILE_STDC_* series of macros to autoconf-archive and m4-common to parallel the AX_CXX_COMPILE_STDCXX_* series, then we could set it directly in the build system, but I don't want to keep custom autoconf goo around to do that just for the benefit of GCC 4.9.
Comment 2 Mart Raudsepp 2017-02-11 20:21:09 UTC
Well, then this bug should still be valid and not WONTFIX, just it happens to need build system fixes, not code changes to not use C99 features.
As you are saying, relying on implicit -std= set by GCC version is wrong.
There is AC_PROG_CC_C99, which shouldn't need any autoconf-archive/m4-common additions.
Comment 3 Michael Catanzaro 2017-02-11 20:53:16 UTC
I'm not going to use AC_PROG_CC_C99. I only test Epiphany using C11.
Comment 4 Michael Catanzaro 2017-04-06 20:24:47 UTC
This is going to be WONTFIX, pending creation of a new autoconf archive macro by someone other than me. Or port to meson.