Opened 6 months ago
Last modified 6 months ago
#70064 assigned defect
grisbi build fails: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
Reported by: | barracuda156 | Owned by: | ctreleaven (Craig Treleaven) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | ||
Port: | grisbi |
Description
Initially build fails with error: redefinition of typedef 'CsvTemplateRule'
, when gcc-4.2 is picked. Upon adding it to backlist, build proceeds but eventually fails with error: 'for' loop initial declarations are only allowed in C99 or C11 mode
error.
For some reason adding configure.cflags-append -std=gnu99
does not have a desired effect: flag is used everywhere except for the only place where it is actually required.
libtool: compile: /opt/local/bin/gcc-mp-13 -DHAVE_CONFIG_H -I. -I.. -I.. -I../src/etats -I../src/prefs -I../src/widgets -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libgsf-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libxml2 -DLOCALEDIR=\"/opt/local/share/locale\" -DPIXMAPS_DIR=\"/opt/local/share/pixmaps/grisbi\" -DDATA_PATH=\"/opt/local/share/grisbi\" -DHELP_PATH=\"/opt/local/share/doc/grisbi\" -DUI_DIR=\"/opt/local/share/grisbi/ui\" -I/opt/local/include/libgoffice-0.10 -I/opt/local/include/libgsf-1 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -pipe -Os -arch ppc -MT grisbi_osx.lo -MD -MP -MF .deps/grisbi_osx.Tpo -c grisbi_osx.m -fno-common -DPIC -o .libs/grisbi_osx.o libtool: compile: /opt/local/bin/gcc-mp-13 -DHAVE_CONFIG_H -I. -I.. -I.. -I../src/etats -I../src/prefs -I../src/widgets -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libgsf-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libxml2 -DLOCALEDIR=\"/opt/local/share/locale\" -DPIXMAPS_DIR=\"/opt/local/share/pixmaps/grisbi\" -DDATA_PATH=\"/opt/local/share/grisbi\" -DHELP_PATH=\"/opt/local/share/doc/grisbi\" -DUI_DIR=\"/opt/local/share/grisbi/ui\" -I/opt/local/include/libgoffice-0.10 -I/opt/local/include/libgsf-1 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -pipe -I/opt/local/libexec/openssl3/include -Os -std=gnu99 -arch ppc -MT utils_widgets.lo -MD -MP -MF .deps/utils_widgets.Tpo -c utils_widgets.c -o utils_widgets.o >/dev/null 2>&1 libtool: compile: /opt/local/bin/gcc-mp-13 -DHAVE_CONFIG_H -I. -I.. -I.. -I../src/etats -I../src/prefs -I../src/widgets -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libgsf-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libxml2 -DLOCALEDIR=\"/opt/local/share/locale\" -DPIXMAPS_DIR=\"/opt/local/share/pixmaps/grisbi\" -DDATA_PATH=\"/opt/local/share/grisbi\" -DHELP_PATH=\"/opt/local/share/doc/grisbi\" -DUI_DIR=\"/opt/local/share/grisbi/ui\" -I/opt/local/include/libgoffice-0.10 -I/opt/local/include/libgsf-1 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -pipe -I/opt/local/libexec/openssl3/include -Os -std=gnu99 -arch ppc -MT utils_str.lo -MD -MP -MF .deps/utils_str.Tpo -c utils_str.c -o utils_str.o >/dev/null 2>&1 libtool: compile: /opt/local/bin/gcc-mp-13 -DHAVE_CONFIG_H -I. -I.. -I.. -I../src/etats -I../src/prefs -I../src/widgets -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libgsf-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/libxml2 -DLOCALEDIR=\"/opt/local/share/locale\" -DPIXMAPS_DIR=\"/opt/local/share/pixmaps/grisbi\" -DDATA_PATH=\"/opt/local/share/grisbi\" -DHELP_PATH=\"/opt/local/share/doc/grisbi\" -DUI_DIR=\"/opt/local/share/grisbi/ui\" -I/opt/local/include/libgoffice-0.10 -I/opt/local/include/libgsf-1 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/libxml2 -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -pipe -I/opt/local/libexec/openssl3/include -Os -std=gnu99 -arch ppc -MT bet_graph.lo -MD -MP -MF .deps/bet_graph.Tpo -c bet_graph.c -o bet_graph.o >/dev/null 2>&1 grisbi_osx.m: In function 'grisbi_osx_init': grisbi_osx.m:246:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode 246 | for (int i = 0; i < argc; i++) { | ^~~ grisbi_osx.m:246:9: note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code make[4]: *** [grisbi_osx.lo] Error 1
Note: See
TracTickets for help on using
tickets.
grisbi_osx.m is an Objective-C file (
.m
extension), not a C file (.c
extension). To add flags for Objective-C files, theOBJCFLAGS
environment variable is used, not theCFLAGS
environment variable. The MacPorts option for that isconfigure.objcflags
rather thanconfigure.cflags
.But if this is the only (or one of only a few) C89 incompatibilities you could instead fix them and submit them to the developers or at least file a bug report about them. Same for the type redefinition.