Fedora 32 rebuild happened recently and xfce4-panel does not build from source when compiled against GCC-10. The build log is here - https://kojipkgs.fedoraproject.org//work/tasks/5282/41325282/build.log How can I fix this? Thanks.
Hi, what version of gcc did you compile with before? I'm just surprised, there's no real change between 4.14.2 and 4.14.3 that would explain the build failure you're getting... (FWIW I still have GCC 9.2.1)
(In reply to Simon Steinbeiss from comment #1) > Hi, what version of gcc did you compile with before? 9.2.1 > I'm just surprised, there's no real change between 4.14.2 and 4.14.3 that > would explain the build failure you're getting... > I do not think it is 4.14.2/4.14.3 The issue is most likely https://gcc.gnu.org/gcc-10/porting_to.html#common. I am not sure though.
Similar gcc-10 issue can also be found in xfce4-cpufreq-plugin, xfce4-sensors-plugin and thunarx-python. Fix is shown in #2. I am not familiar with the code to apply the fix sadly. See build logs here in these pages - cpufreq - https://koji.fedoraproject.org/koji/taskinfo?taskID=41325300 sensors - https://koji.fedoraproject.org/koji/taskinfo?taskID=41322934 thunarx-python - https://koji.fedoraproject.org/koji/taskinfo?taskID=41323181
(In reply to Mukundan Ragavan from comment #3) > > cpufreq - https://koji.fedoraproject.org/koji/taskinfo?taskID=41325300 > I think I was able to fix cpufreq with sed -i 's/CpuFreqPlugin \*cpuFreq/extern CpuFreqPlugin \*cpuFreq/' panel-plugin/xfce4-cpufreq-plugin.h That said, not sure how to address panel (which is what this bug is about).
ping! Any ideas on getting this to compile? Thanks.
The problem here isn't gcc10, but new vala (at least on my ppc64le system) ... make[3]: Entering directory '/builddir/build/BUILD/xfce4-panel-4.14.3/libxfce4panel' /usr/bin/vapigen-0.48 --library libxfce4panel-2.0 --metadatadir . --girdir /usr/share/gir-1.0 libxfce4panel-2.0.gir Generation failed: 1 error(s), 1 warning(s) make[3]: Leaving directory '/builddir/build/BUILD/xfce4-panel-4.14.3/libxfce4panel' warning: empty metadata libxfce4panel-2.0.gir:2359.7-2359.40: error: overriding method `Xfce.PanelPlugin.remote_event' is incompatible with base method `bool Xfce.PanelPluginProvider.remote_event (string, GLib.Value, uint)': too few parameters. <glib:signal name="remote-event" when="last"> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ make[3]: *** [/usr/share/vala/Makefile.vapigen:61: libxfce4panel-2.0.vapi] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Entering directory '/builddir/build/BUILD/xfce4-panel-4.14.3/libxfce4panel' /usr/bin/g-ir-compiler --includedir=. --includedir=/usr/share/gir-1.0 --includedir=. --includedir=. libxfce4panel-2.0.gir -o libxfce4panel-2.0.typelib make[3]: Leaving directory '/builddir/build/BUILD/xfce4-panel-4.14.3/libxfce4panel' make[2]: *** [Makefile:891: all] Error 2 xfce4-panel-4.14.3-2.fc33 builds fine in Rawhide when I downgrade vala to vala-0.46.5-1.fc32. From the error message I guess it reports a real problem in xfce4-panel.
Created attachment 9486 Fix build for Fedora 32 This patch can fix the build, but I haven't go deep to see whether it is semantically correct.
I'm also not sure if this is semantically correct, but for reference, this is the commit that introduced the handle: https://git.xfce.org/xfce/xfce4-panel/commit/?id=d168066d3
Comment on attachment 9486 Fix build for Fedora 32 The code is insane on the C level. But it is ambiguous on the Vala level and latest Vala turns this ambiguity into an error. To fix that, the Vala API has to be specified manually, otherwise the C API/ABI has to be changed.
Additional info: with vala 0.48.0, xfce4-panel no longer builds. Downgrading to 0.46.6 makes it work again. Looks like a vala regression/change.
*** Bug 16562 has been marked as a duplicate of this bug. ***
The patch from comment #9 breaks the plugin-event refresh functionality.
*** Bug 16706 has been marked as a duplicate of this bug. ***
(In reply to ToZ from comment #12) > The patch from comment #9 breaks the plugin-event refresh functionality. I might be missing something but isn't the args order wrong? - name, value, &stop_emission); + name, value, handle, &stop_emission);
oh, nevermind!!11
Maybe these warnings should be errors? please ? (while using patch from Comment 9 ) xfce-panel-plugin.c:353: Warning: libxfce4panel: incorrect number of parameters in comment block, parameter annotations will be ignored. GICOMP libxfce4panel-2.0.gir VAPIGEN libxfce4panel-2.0.vapi warning: empty metadata applicationsmenu.c: In function ‘applications_menu_plugin_class_init’: applicationsmenu.c:143:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 143 | plugin_class->remote_event = applications_menu_plugin_remote_event; | directorymenu.c: In function ‘directory_menu_plugin_class_init’: directorymenu.c:132:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 132 | plugin_class->remote_event = directory_menu_plugin_remote_event; | launcher.c: In function ‘launcher_plugin_class_init’: launcher.c:280:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 280 | plugin_class->remote_event = launcher_plugin_remote_event; | windowmenu.c: In function ‘window_menu_plugin_class_init’: windowmenu.c:164:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 164 | plugin_class->remote_event = window_menu_plugin_remote_event; | ^
let me align those so that's more obvious there's a missing arg. applicationsmenu.c: In function ‘applications_menu_plugin_class_init’: applicationsmenu.c:143:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 143 | plugin_class->remote_event = applications_menu_plugin_remote_event; | directorymenu.c: In function ‘directory_menu_plugin_class_init’: directorymenu.c:132:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 132 | plugin_class->remote_event = directory_menu_plugin_remote_event; | launcher.c: In function ‘launcher_plugin_class_init’: launcher.c:280:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 280 | plugin_class->remote_event = launcher_plugin_remote_event; | windowmenu.c: In function ‘window_menu_plugin_class_init’: windowmenu.c:164:30: warning: assignment to ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *, guint *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *, unsigned int *)’} from incompatible pointer type ‘gboolean (*)(XfcePanelPlugin *, const gchar *, const GValue *)’ {aka ‘int (*)(struct _XfcePanelPlugin *, const char *, const struct _GValue *)’} [-Wincompatible-pointer-types] 164 | plugin_class->remote_event = window_menu_plugin_remote_event; | ^
Created attachment 9763 the Comment 9 patch without the above warnings (eg. built with -Werror) not sure if it's complete, maybe that 'handle' arg. needs to be used somehow, no idea
From what I understand, the "handle" has been added back in 2010 in https://git.xfce.org/xfce/xfce4-panel/commit/?id=d168066d3 But not for internal plugins. External plugins (all plugins not in core panel - launcher, windowmenu, directorymenu, applicationmenu) already get the "handle" with https://git.xfce.org/xfce/xfce4-panel/tree/panel/panel-plugin-external-wrapper.c#n346 / https://git.xfce.org/xfce/xfce4-panel/tree/panel/panel-plugin-external-wrapper.c#n424 . Btw, It seems that only xfce4-places-plugin g_connect to the "remote-event" signal I don't know exactly why internal plugins doesn't have the handle emitted (omission ?) I guess your patch is logic, and fix the problem (need to double check if any behavior change). Looks good on 4.14 branch too. gtkdoc needs to be updated for "XfcePanelPlugin::remote-event" part to add handle arg.
Unfortunately, the patch in comment 18 doesn't work for me with respect to remote event functionality. Tested with applicationsmenu and directorymenu: Commands: /usr/bin/xfce4-panel --plugin-event=applicationsmenu:popup:bool:false /usr/bin/xfce4-panel --plugin-event=directorymenu:popup:bool:false (this is basically what the popup commands do). Also doesn't work for the genmon plugin, but I haven't looked into yet as this needs to fixed first. As well, the whiskermenu and places plugin use remote event functionality.
Yes, right, I really don't understand this code :) For now you can compile panel with "--enable-vala=no". We can update m4/vapigen.m4 to default to "no" until fixed. Or we can skip remote_event processing by vapigen with: """ PanelPlugin.remote_event skip """ in libxfce4panel/libxfce4panel-2.0.metadata file, not sure what this can break, but not so much people are using vala binding… Note: I spotted a bug in '-p' argument on xfce4-popup-windowmenu or xfce4-popup-applicationsmenu or xfce4-popup-directorymenu: the menu is not popped up at pointer, but that's another topic.
Enabled debugging. I get this message when trying using remote-event: (xfce4-panel:39074): libxfce4panel-CRITICAL **: 19:33:33.617: _libxfce4panel_marshal_BOOLEAN__STRING_BOXED: assertion 'n_param_values == 3' failed
@Skunnyk, thanks. With "--enable-vala=no", remote-event works again and can build with vala 48. Not sure if anything else gets broken with vala disabled. You are right about the "-p" parameter, something is broken there. Here is the debug output: (xfce4-panel:59323): Gtk-CRITICAL **: 19:50:59.607: gtk_menu_popup_at_widget: assertion 'GTK_IS_WIDGET (widget)' failed
Created attachment 9806 Fix panel build with vala 0.48 For now, skip the processing of "PanelPlugin.remote_event" during vapigen. The warning was present on vala <0.48, but is now an error. This will remove "PanelPlugin.remote_event" from vala binding until we find a better fix (if there is any)
Thanks for the simplified patch. Works fine here. No issues noted yet.
Romain Bouvier referenced this bugreport in commit 659d61ee2901ffe1e34f7dbcf5d8213b7a17d142 Fix panel build with vala 0.48 (Bug #16426) https://git.xfce.org/xfce/xfce4-panel/commit?id=659d61ee2901ffe1e34f7dbcf5d8213b7a17d142
I will close this issue as fixed - even if it is a workaround - until someone with a vala plugin wants to use this feature and reopens it ;)
Romain Bouvier referenced this bugreport in commit 4922b1136a91b3696b65c6f8b43253aa52c12b76 Fix panel build with vala 0.48 (Bug #16426) https://git.xfce.org/xfce/xfce4-panel/commit?id=4922b1136a91b3696b65c6f8b43253aa52c12b76