Bug #2765
Networkmanager applet build problem with glib 2.58 and -Werror due to deprecation warning
Status:
Closed
Priority:
Normal
Assignee:
Category:
networkmanager (charon-nm)
Target version:
Start date:
Due date:
Estimated time:
Affected version:
5.6.3
Resolution:
Fixed
Description
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[3]: *** [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
Related issues
Associated revisions
History
#1 Updated by Tobias Brunner over 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.
#2 Updated by Harald Dunkel over 2 years ago
I have updated Debian's bug report.
#3 Updated by Tobias Brunner over 1 year ago
- Related to Bug #3197: NM applet build error on Debian sid when building with -Werror due to deprecation warning added
#4 Updated by Tobias Brunner about 1 year ago
- Target version set to 5.8.3
Pushed a possible fix to the 2765-nm-glib-private branch.
#5 Updated by Tobias Brunner 12 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
nm: Replace deprecated g_type_class_add_private()
Fixes #2765, #3197.