! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
pulseaudio-config.c:457:3: error: 'for' loop initial declarations are only al...
Status:
RESOLVED: FIXED
Product:
Xfce4-pulseaudio-plugin
Component:
General

Comments

Description Michał Górny 2017-11-23 19:25:53 CET
Created attachment 7444 
Full build log

We've just received a bug report from a user using gcc-4.9* that the newest release does not build with that compiler out of the box due to using C99 features: While this probably isn't a major issue, it'd be nice to explicitly declare that the package needs C99. If I recall correctly, this can be done using the following autoconf macro:

  AC_PROG_CC_C99

Error message:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DG_LOG_DOMAIN=\"pulseaudio-plugin\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -DDEFAULT_MIXER_COMMAND=\"pavucontrol\" -DDATADIR=\"/usr/share\" -DNDEBUG -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -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/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/xfce4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/xfce4/libxfce4ui-2 -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/xfce4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/xfce4/libxfce4panel-2.0 -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/xfce4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/xfce4/xfconf-0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 -pipe -mpclmul -mpopcnt -march=native -ftree-vectorize -c pulseaudio-config.c  -fPIC -DPIC -o .libs/libpulseaudio_plugin_la-pulseaudio-config.o
pulseaudio-config.c: In function 'pulseaudio_config_set_mpris_players':
pulseaudio-config.c:457:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (guint i = 0; i < g_strv_length (players); i++) {
   ^
pulseaudio-config.c:457:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
pulseaudio-config.c:462:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (GSList *list = player_array; list != NULL; list = g_slist_next (list)) {
   ^
make[3]: *** [Makefile:684: libpulseaudio_plugin_la-pulseaudio-config.lo] Error 1

Bug #14028

Reported by:
Michał Górny
Reported on: 2017-11-23
Last modified on: 2017-11-29

People

Assignee:
Andrzej
CC List:
1 user

Version

Version:
unspecified

Attachments

Full build log (39.02 KB, text/x-log)
2017-11-23 19:25 CET , Michał Górny
no flags

Additional information