GNOME Bugzilla – Bug 767917
Build failure with GCC 6
Last modified: 2021-05-26 09:25:31 UTC
vinagre 3.21.3 fails to build with GCC 6: /home/mcatanzaro/releases/gnome-apps-3.21.3/vinagre-3.21.3/vinagre/vinagre-utils.c: In function ‘vinagre_utils_request_credential’: /home/mcatanzaro/releases/gnome-apps-3.21.3/vinagre-3.21.3/vinagre/vinagre-utils.c:686:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] _tmp12_ = g_strdup_printf (_tmp10_, _tmp11_); ^~~~~~~ My workaround was to add to my jhbuildrc: module_extra_env = { 'vinagre': {'CFLAGS': '-w' }, } This should really be done automatically by vinagre. Since Vala does not attempt to generate warning-free code, it's not reasonable to display warnings from the C compiler -- that just makes it impossible to notice real warnings from the vala compiler.
If you fix this bug, you'll want to add it back to jhbuild (in gnome-world please): https://git.gnome.org/browse/jhbuild/commit/?id=3c1b38950401eaaded5474826cb9203550c8b6e7
Created attachment 348437 [details] [review] GCC 6 build failure patch I made a quick patch to be able to compile master with GCC 6, not sure if this is the best way though
It’s definitely not — it results in an untranslatable string.
(In reply to Piotr Drąg from comment #3) > It’s definitely not — it results in an untranslatable string. Thanks for the heads up. In that case, the only workaround is to compile with -Wno-error=format-nonliteral ? Or something can be done on the vala code ?
Review of attachment 348437 [details] [review]: vinagre should add -w to CFLAGS in some Makefile.am. It's IMO wrong to enable C warnings for Vala programs, as Vala does not generate warning-free C code. At any rate, modifying Vala to not trigger Werror=format-nonliteral would be the other alternative, but that seems pretty excessive.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Vinagre, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/vinagre/-/issues/ Thank you for your understanding and your help.