mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
185 stars 118 forks source link

1.27.2: build fails #1416

Closed kloczek closed 1 year ago

kloczek commented 1 year ago

Expected behaviour

Build should not fai;.

Actual behaviour

make[4]: Entering directory '/home/tkloczko/rpmbuild/BUILD/mate-panel-1.27.2/mate-panel'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -pthread -I/usr/include/harfbuzz -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/mate-desktop-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/mate-menus -I/usr/include/gio-unix-2.0 -I. -I. -I../mate-panel -I../mate-panel/mate-submodules -I../mate-panel/libpanel-util -DMATELOCALEDIR=\""/usr/share/locale"\" -DPANELDATADIR=\""/usr/share/mate-panel"\"  -I/usr/include/gtk-layer-shell -I/usr/include/gtk-3.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -DPANEL_MODULES_DIR=\"/usr/lib64/mate-panel/modules\" -DMATEMENU_I_KNOW_THIS_IS_UNSTABLE -I/usr/include/gtk-layer-shell -I/usr/include/gtk-3.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Os -c -o mate_panel-panel-menu-items.o `test -f 'panel-menu-items.c' || echo './'`panel-menu-items.c
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from panel-menu-items.h:27,
                 from panel-menu-items.c:38:
panel-menu-items.c: In function ‘panel_place_menu_item_get_type_once’:
panel-menu-items.c:90:72: error: ‘MATE_TYPE_IMAGE_MENU_ITEM’ undeclared (first use in this function); did you mean ‘GTK_TYPE_IMAGE_MENU_ITEM’?
   90 | G_DEFINE_TYPE_WITH_PRIVATE (PanelPlaceMenuItem, panel_place_menu_item, MATE_TYPE_IMAGE_MENU_ITEM)
      |                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2307:40: note: in definition of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER’
 2307 |         g_type_register_static_simple (TYPE_PARENT, \
      |                                        ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2045:61: note: in expansion of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
 2045 | #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1868:61: note: in expansion of macro ‘G_DEFINE_TYPE_EXTENDED’
 1868 | #define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P)            G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN))
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c:90:1: note: in expansion of macro ‘G_DEFINE_TYPE_WITH_PRIVATE’
   90 | G_DEFINE_TYPE_WITH_PRIVATE (PanelPlaceMenuItem, panel_place_menu_item, MATE_TYPE_IMAGE_MENU_ITEM)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c:90:72: note: each undeclared identifier is reported only once for each function it appears in
   90 | G_DEFINE_TYPE_WITH_PRIVATE (PanelPlaceMenuItem, panel_place_menu_item, MATE_TYPE_IMAGE_MENU_ITEM)
      |                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2307:40: note: in definition of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER’
 2307 |         g_type_register_static_simple (TYPE_PARENT, \
      |                                        ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2045:61: note: in expansion of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
 2045 | #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1868:61: note: in expansion of macro ‘G_DEFINE_TYPE_EXTENDED’
 1868 | #define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P)            G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN))
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c:90:1: note: in expansion of macro ‘G_DEFINE_TYPE_WITH_PRIVATE’
   90 | G_DEFINE_TYPE_WITH_PRIVATE (PanelPlaceMenuItem, panel_place_menu_item, MATE_TYPE_IMAGE_MENU_ITEM)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c: In function ‘panel_desktop_menu_item_get_type_once’:
panel-menu-items.c:91:76: error: ‘MATE_TYPE_IMAGE_MENU_ITEM’ undeclared (first use in this function); did you mean ‘GTK_TYPE_IMAGE_MENU_ITEM’?
   91 | G_DEFINE_TYPE_WITH_PRIVATE (PanelDesktopMenuItem, panel_desktop_menu_item, MATE_TYPE_IMAGE_MENU_ITEM)
      |                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2307:40: note: in definition of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER’
 2307 |         g_type_register_static_simple (TYPE_PARENT, \
      |                                        ^~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2045:61: note: in expansion of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
 2045 | #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1868:61: note: in expansion of macro ‘G_DEFINE_TYPE_EXTENDED’
 1868 | #define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P)            G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN))
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c:91:1: note: in expansion of macro ‘G_DEFINE_TYPE_WITH_PRIVATE’
   91 | G_DEFINE_TYPE_WITH_PRIVATE (PanelDesktopMenuItem, panel_desktop_menu_item, MATE_TYPE_IMAGE_MENU_ITEM)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c: In function ‘panel_menu_items_append_from_desktop’:
panel-menu-items.c:234:17: warning: ‘gtk_image_menu_item_new’ is deprecated: Use 'gtk_menu_item_new' instead [-Wdeprecated-declarations]
  234 |                 item = gtk_image_menu_item_new ();
      |                 ^~~~
In file included from /usr/include/gtk-3.0/gtk/gtk.h:269:
/usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:78:12: note: declared here
   78 | GtkWidget* gtk_image_menu_item_new               (void);
      |            ^~~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c: In function ‘panel_menu_items_create_action_item_full’:
panel-menu-items.c:315:9: warning: ‘gtk_image_menu_item_new’ is deprecated: Use 'gtk_menu_item_new' instead [-Wdeprecated-declarations]
  315 |         item = gtk_image_menu_item_new ();
      |         ^~~~
/usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:78:12: note: declared here
   78 | GtkWidget* gtk_image_menu_item_new               (void);
      |            ^~~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c: In function ‘panel_place_menu_item_append_gtk_bookmarks’:
panel-menu-items.c:461:17: warning: ‘gtk_image_menu_item_new’ is deprecated: Use 'gtk_menu_item_new' instead [-Wdeprecated-declarations]
  461 |                 item = gtk_image_menu_item_new ();
      |                 ^~~~
/usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:78:12: note: declared here
   78 | GtkWidget* gtk_image_menu_item_new               (void);
      |            ^~~~~~~~~~~~~~~~~~~~~~~
panel-menu-items.c: In function ‘panel_place_menu_item_append_local_gio’:
panel-menu-items.c:908:17: warning: ‘gtk_image_menu_item_new’ is deprecated: Use 'gtk_menu_item_new' instead [-Wdeprecated-declarations]
  908 |                 menu_item = gtk_image_menu_item_new ();
      |                 ^~~~~~~~~
/usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:78:12: note: declared here
   78 | GtkWidget* gtk_image_menu_item_new               (void);
      |            ^~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:1333: mate_panel-panel-menu-items.o] Error 1

Steps to reproduce the behaviour

MATE general version

mate-panel 1.27.2. I'v e tested this issue with all commits added after last version.

Package version

glib 2.78.1 gtk3 3.24.38 libmateweather 1.27.1 mate-desktop1.27.3 mate-menus 1.27.0

Linux Distribution

My own.

Link to bugreport of your Distribution (requirement)

N/A

raveit65 commented 1 year ago

Can you try mate-desktop from master? Or rebuild my SRPM (1.27.3 + master commits) https://www.dropbox.com/scl/fi/jzy3cnabi10dxunps8yxw/mate-desktop-1.27.3-2.fc38.src.rpm?rlkey=wk9rvmpjk2ganvitliqa9ypq7&dl=0

kloczek commented 1 year ago

Tested tjat and it sdoes not work. Part of my spec file

URL:            https://mate-desktop.org/
VCS:            https://github.com/mate-desktop/mate-panel/
Source:         https://pub.mate-desktop.org/releases/%(v=%{version}; echo ${v%.*})/%{name}-%{version}.tar.xz
Source:         %{name}_fedora-28.layout
Source:         %{name}_rhel.layout
Patch:          %{VCS}/commit/cf544b71.patch#/%{name}-Hidpi-x11-center-panel-force-quit-popup-window.patch
Patch:          %{VCS}/commit/170842ce.patch#/%{name}-Force-quit-x11-Fix-misalignment-of-popup-with-multim.patch
Patch:          %{VCS}/commit/4c6fc7e3.patch#/%{name}-Wayland-Make-panel-shutdown-button-work-under-waylan.patch
Patch:          %{VCS}/commit/a6ea51bb.patch#/%{name}-Wayland-Fix-force-quit-unsupported-message-dialog.patch
Patch:          %{VCS}/commit/675f72ff.patch#/%{name}-Main-menus-fix-missing-Places-System-icons.patch
Patch:          %{VCS}/commit/353c71ea.patch#/%{name}-status-notifier-fix-a-typo.patch
Patch:          %{VCS}/commit/95a92215.patch#/%{name}-status-notifier-fix-typo.patch
Patch:          %{VCS}/commit/d87c912c.patch#/%{name}-status-notifier-Show-AttentionIcon-when-Status-is-Ne.patch

and ..

[tkloczko@pers-jacek mate-panel]$ grep -r MATE_TYPE_IMAGE_MENU_ITEM /usr/include/
/usr/include/mate-desktop-2.0/libmate-desktop/mate-image-menu-item.h:#define MATE_TYPE_IMAGE_MENU_ITEM            (mate_image_menu_item_get_type ())

So I've added patch:

--- a/mate-panel/panel-menu-items.c
+++ b/mate-panel/panel-menu-items.c
@@ -47,6 +47,7 @@
 #include <libpanel-util/panel-keyfile.h>
 #include <libpanel-util/panel-launch.h>
 #include <libpanel-util/panel-show.h>
+#include <libmate-desktop/mate-image-menu-item.h>

 #include "menu.h"
 #include "panel-action-button.h"

and with that patch I was able sucessfuly build mate-panel.

kloczek commented 1 year ago

BTW I made short test ..

[tkloczko@pers-jacek SPECS]$ rpmbuild -ba mate-panel.spec --quiet 2>&1 | grep -- \\[-W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr
    121 -Wdeprecated-declarations
      6 -Wmisleading-indentation
      1 -Wunused-but-set-variable

It would be good start working on clean all those warnings ..

raveit65 commented 1 year ago

#include <libmate-desktop/mate-image-menu-item.h> https://github.com/mate-desktop/mate-panel/blob/master/mate-panel/panel-menu-items.c#L44

lukefromdc commented 1 year ago

So how is it anyone pulled from git and got source code with that line missing? Builds have worked on my end and without it would be expected to fail

kloczek commented 1 year ago

As you see I'm applying commits patches on top of dist tar ball.

kloczek commented 1 year ago

Just checked one more time dist tar ball and looks like it has missing that line..

raveit65 commented 1 year ago

Because the commit which added that line was commited after the 1.27.2 release. https://github.com/mate-desktop/mate-panel/commit/ebb3a795a351ca600eb539ed2bba013a6533d749 I recommend using distro rpms from stable 1.26 branch eg. from fedora.