Bug #3197
NM applet build error on Debian sid when building with -Werror due to deprecation warning
Description
Trying to build the n-m-s applet 4.5.1 on Debian sid I get an error
: make[1]: Entering directory '/build/network-manager-strongswan-1.4.5' make all-recursive make[2]: Entering directory '/build/network-manager-strongswan-1.4.5' Making all in properties make[3]: Entering directory '/build/network-manager-strongswan-1.4.5/properties' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2 -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2 -pthread -I/usr/include/libnma -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DUIDIR=\""/usr/share/gnome-vpn-properties/strongswan"\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -Wno-deprecated-declarations -Wall -Werror -std=gnu89 -g -O2 -fdebug-prefix-map=/build/network-manager-strongswan-1.4.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -c -o libnm_vpn_plugin_strongswan_la-nm-strongswan.lo `test -f 'nm-strongswan.c' || echo './'`nm-strongswan.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2 -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2 -pthread -I/usr/include/libnma -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DUIDIR=\"/usr/share/gnome-vpn-properties/strongswan\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -Wno-deprecated-declarations -Wall -Werror -std=gnu89 -g -O2 -fdebug-prefix-map=/build/network-manager-strongswan-1.4.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -c nm-strongswan.c -fPIC -DPIC -o .libs/libnm_vpn_plugin_strongswan_la-nm-strongswan.o nm-strongswan.c: In function 'check_validity': nm-strongswan.c:117:13: error: G_ADD_PRIVATE [-Werror] 117 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'settings_changed_cb': nm-strongswan.c:209:13: error: G_ADD_PRIVATE [-Werror] 209 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'show_toggled_cb': nm-strongswan.c:221:13: error: G_ADD_PRIVATE [-Werror] 221 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'toggle_proposal_cb': nm-strongswan.c:234:13: error: G_ADD_PRIVATE [-Werror] 234 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'init_password_icon': nm-strongswan.c:250:13: error: G_ADD_PRIVATE [-Werror] 250 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'init_plugin_ui': nm-strongswan.c:284:13: error: G_ADD_PRIVATE [-Werror] 284 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'get_widget': nm-strongswan.c:419:13: error: G_ADD_PRIVATE [-Werror] 419 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'update_connection': nm-strongswan.c:461:13: error: G_ADD_PRIVATE [-Werror] 461 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'nm_vpn_plugin_ui_widget_interface_new': nm-strongswan.c:589:13: error: G_ADD_PRIVATE [-Werror] 589 | priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (object); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'dispose': nm-strongswan.c:627:13: error: G_ADD_PRIVATE [-Werror] 627 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (plugin); | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [Makefile:569: libnm_vpn_plugin_strongswan_la-nm-strongswan.lo] Error 1 make[3]: Leaving directory '/build/network-manager-strongswan-1.4.5/properties' make[2]: *** [Makefile:533: all-recursive] Error 1 make[2]: Leaving directory '/build/network-manager-strongswan-1.4.5' make[1]: *** [Makefile:423: all] Error 2 make[1]: Leaving directory '/build/network-manager-strongswan-1.4.5' dh_auto_build: make -j8 returned exit code 2 make: *** [debian/rules:4: build] Error 255 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /local/pbuilder/build//20085 and its subdirectories
Full log is attached.
There are no failures on Debian 10.
Related issues
History
#1 Updated by Harald Dunkel almost 6 years ago
- File build-k.sid.txt build-k.sid.txt added
#2 Updated by Tobias Brunner almost 6 years ago
- Related to Bug #2765: Networkmanager applet build problem with glib 2.58 and -Werror due to deprecation warning added
#3 Updated by Tobias Brunner almost 6 years ago
- File glib-private.patch glib-private.patch added
- Category set to networkmanager (charon-nm)
- Status changed from New to Feedback
I guess you could get it to build if you do without -Werror
as these errors are probably caused by deprecation warnings that are treated as errors (i.e. it's probably an extension of #2765). As seen there and in the log here, we have to replace g_type_class_add_private
. Don't know whether the attached patch is already enough.
#4 Updated by Tobias Brunner over 5 years ago
Harald, have you been able to verify whether the patch fixes the issue (now also pushed to the 2765-nm-glib-private branch).
#5 Updated by Harald Dunkel over 5 years ago
Sorry to say, but it still does not build:
make[3]: Entering directory '/build/network-manager-strongswan-1.4.5/properties' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2 -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2 -pthread -I/usr/include/libnma -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/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/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DUIDIR=\""/usr/share/gnome-vpn-properties/strongswan"\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -Wno-deprecated-declarations -Wall -Werror -std=gnu89 -g -O2 -fdebug-prefix-map=/build/network-manager-strongswan-1.4.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -c -o libnm_vpn_plugin_strongswan_la-nm-strongswan.lo `test -f 'nm-strongswan.c' || echo './'`nm-strongswan.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2 -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2 -pthread -I/usr/include/libnma -I/usr/include/libnm -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/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/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DUIDIR=\"/usr/share/gnome-vpn-properties/strongswan\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -Wno-deprecated-declarations -Wall -Werror -std=gnu89 -g -O2 -fdebug-prefix-map=/build/network-manager-strongswan-1.4.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -c nm-strongswan.c -fPIC -DPIC -o .libs/libnm_vpn_plugin_strongswan_la-nm-strongswan.o nm-strongswan.c: In function 'check_validity': nm-strongswan.c:117:13: error: G_ADD_PRIVATE [-Werror] 117 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'settings_changed_cb': nm-strongswan.c:209:13: error: G_ADD_PRIVATE [-Werror] 209 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'show_toggled_cb': nm-strongswan.c:221:13: error: G_ADD_PRIVATE [-Werror] 221 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'toggle_proposal_cb': nm-strongswan.c:234:13: error: G_ADD_PRIVATE [-Werror] 234 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'init_password_icon': nm-strongswan.c:250:13: error: G_ADD_PRIVATE [-Werror] 250 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'init_plugin_ui': nm-strongswan.c:284:13: error: G_ADD_PRIVATE [-Werror] 284 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'get_widget': nm-strongswan.c:419:13: error: G_ADD_PRIVATE [-Werror] 419 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'update_connection': nm-strongswan.c:461:13: error: G_ADD_PRIVATE [-Werror] 461 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'nm_vpn_plugin_ui_widget_interface_new': nm-strongswan.c:589:13: error: G_ADD_PRIVATE [-Werror] 589 | priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (object); | ^~~~~~~~~~~~~~~ nm-strongswan.c: In function 'dispose': nm-strongswan.c:627:13: error: G_ADD_PRIVATE [-Werror] 627 | StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (plugin); | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [Makefile:569: libnm_vpn_plugin_strongswan_la-nm-strongswan.lo] Error 1 make[3]: Leaving directory '/build/network-manager-strongswan-1.4.5/properties' make[2]: *** [Makefile:533: all-recursive] Error 1 make[2]: Leaving directory '/build/network-manager-strongswan-1.4.5' make[1]: *** [Makefile:423: all] Error 2 make[1]: Leaving directory '/build/network-manager-strongswan-1.4.5' dh_auto_build: make -j8 returned exit code 2 make: *** [debian/rules:4: build] Error 255
#6 Updated by Harald Dunkel over 5 years ago
PS: This looks like before, but the patch has been applied. I double-checked.
#7 Updated by Tobias Brunner over 5 years ago
Strange error message/warning (G_ADD_PRIVATE
is not deprecated). But apparently G_TYPE_INSTANCE_GET_PRIVATE
is. I've updated the patch in the branch.
#8 Updated by Harald Dunkel over 5 years ago
Using the new patch the applet build error is gone. No problems so far, so good work.
But I wonder what the patch to charon-nm is good for? The applet seems to work with Debian's strongswan 5.8.1. Do I have to ask Debian's strongswan maintainers to include the patch?
#9 Updated by Tobias Brunner over 5 years ago
Using the new patch the applet build error is gone. No problems so far, so good work.
OK, great. Thanks for testing.
Do I have to ask Debian's strongswan maintainers to include the patch?
Won't they run into the same issue eventually? Or don't they build with -Werror
? But if they don't complain, that's fine, I guess (it's only a compilation issue afterall).
Looking at that part of the patch again, it wasn't actually complete (same issue fixed with the update above). I've changed the patch in the branch again.
#10 Updated by Tobias Brunner over 5 years ago
- Tracker changed from Issue to Bug
- Subject changed from applet build error on Debian sid to NM applet build error on Debian sid when building with -Werror due to deprecation warning
- Status changed from Feedback to Closed
- Assignee set to Tobias Brunner
- Target version set to 5.8.3
- Resolution set to Fixed