After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767917 - Build failure with GCC 6
Build failure with GCC 6
Status: RESOLVED OBSOLETE
Product: vinagre
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks:
 
 
Reported: 2016-06-21 17:42 UTC by Michael Catanzaro
Modified: 2021-05-26 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GCC 6 build failure patch (919 bytes, patch)
2017-03-21 19:24 UTC, Arnaud Lefebvre
rejected Details | Review

Description Michael Catanzaro 2016-06-21 17:42:54 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.
Comment 1 Michael Catanzaro 2016-11-26 13:01:20 UTC
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
Comment 2 Arnaud Lefebvre 2017-03-21 19:24:39 UTC
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
Comment 3 Piotr Drąg 2017-03-21 19:27:37 UTC
It’s definitely not — it results in an untranslatable string.
Comment 4 Arnaud Lefebvre 2017-03-21 22:13:12 UTC
(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 ?
Comment 5 Michael Catanzaro 2017-03-22 00:27:34 UTC
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.
Comment 6 André Klapper 2021-05-26 09:25:31 UTC
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.