Networkmanager applet build problem with glib 2.58 and -Werror due to deprecation warning
Apparently some constructs in glib 2.58 have been deprecated, affecting the applet:
... nm-strongswan.c: In function 'strongswan_plugin_ui_widget_class_init': nm-strongswan.c:647:2: error: 'g_type_class_add_private' is deprecated [-Werror=deprecated-declarations] g_type_class_add_private (req_class, sizeof (StrongswanPluginUiWidgetPrivate)); ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/glib-2.0/gobject/gobject.h:24, from /usr/include/glib-2.0/gobject/gbinding.h:29, from /usr/include/glib-2.0/glib-object.h:23, from /usr/include/glib-2.0/gio/gioenums.h:28, from /usr/include/glib-2.0/gio/giotypes.h:28, from /usr/include/glib-2.0/gio/gio.h:26, 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 nm-strongswan.c:28: /usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here void g_type_class_add_private (gpointer g_class, ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:568: libnm_vpn_plugin_strongswan_la-nm-strongswan.lo] Error 1
Further information can be found in Debian's bug report https://bugs.debian.org/907953 and the comments on https://gitlab.gnome.org/GNOME/glib/commit/7e5db31d36532274c2b2428ef9bace796928785e
#1 Updated by Tobias Brunner almost 2 years ago
- Tracker changed from Issue to Bug
- Category set to networkmanager (charon-nm)
- Status changed from New to Feedback
This is not yet mentioned in the official API doc. Is Debian really using such a bleeding edge version of glib? Anyway, deprecation does not mean it can't be used anymore, so you could just "fix" this by disabling that warning for now.
According to the commit message/comment, a proper fix should refactor this to use
G_ADD_PRIVATE()/G_DEFINE_*(). Since I don't really know glib this will need some time to look into.
#5 Updated by Tobias Brunner 5 months ago
- Subject changed from Networkmanager applet build problem with glib 2.58 to Networkmanager applet build problem with glib 2.58 and -Werror due to deprecation warning
- Status changed from Feedback to Closed
- Assignee set to Tobias Brunner
- Resolution set to Fixed