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 658467 - Replace g_format_size_for_display() by g_format_size()
Replace g_format_size_for_display() by g_format_size()
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.7.3
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
: 662200 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-07 13:32 UTC by Sebastian Pipping
Modified: 2011-11-30 22:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing the issue (11.60 KB, patch)
2011-09-13 09:47 UTC, Michael Natterer
none Details | Review

Description Sebastian Pipping 2011-09-07 13:32:24 UTC
configure.ac contains the lines

  if test "x$have_glib_2_32" != "xyes"; then
    CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED"
  fi

which define G_DISABLE_DEPRECATED when compiled against any version of glib but 2.32.

The problem: with glib 2.29(.14) this removes at least one function that Gimp relies on: g_format_size_for_display.  This is the situation in glib:

  $ fgrep -R -h -C1 g_format_size_for_display /usr/include/glib-2.0/
  #ifndef G_DISABLE_DEPRECATED
  char *g_format_size_for_display (goffset size);
  #endif

Please fix the guard around addition of G_DISABLE_DEPRECATED for glib or resolve use of g_format_size_for_display or both.  Thanks!
Comment 1 Michael Natterer 2011-09-13 09:47:16 UTC
Created attachment 196345 [details] [review]
Patch fixing the issue

Will apply attached patch once we depend on GLib 2.30. Until then
I'll fix configure.
Comment 2 Sebastian Pipping 2011-09-13 12:09:14 UTC
Sounds good.  Which way do you intend to patch configure?
Comment 3 Michael Natterer 2011-10-02 13:18:18 UTC
Fix the warnings:

commit 38c412ea4ffccd6ab529f3be9cd263bdc0c77ecc
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Oct 2 15:13:18 2011 +0200

    configure: don't add G_DISABLE_DEPRECATED for GLIb 2.30
    
    because we still use g_format_size_for_display().

 configure.ac |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Changing bug title instead of closing so the attached patch
isn't forgotten.
Comment 4 Sebastian Pipping 2011-10-02 13:26:37 UTC
The problem also exists with glib 2.29 (not just 2.30) so the recent patch

http://git.gnome.org/browse/gimp/commit/?id=38c412ea4ffccd6ab529f3be9cd263bdc0c77ecc

does not seem to solve the problem for 2.29.  Is that intended?
Comment 5 Michael Natterer 2011-10-19 17:43:34 UTC
*** Bug 662200 has been marked as a duplicate of this bug. ***
Comment 6 Michael Natterer 2011-11-30 22:39:56 UTC
Fixed in master:

commit 9781aa65ea3079297e3ac7a3f40c4b7ed4c08564
Author: Michael Natterer <mitch@gimp.org>
Date:   Tue Sep 13 11:39:24 2011 +0200

    Bug 658467 - Replace g_format_size_for_display() by g_format_size()
    
    Use g_format_size() instead of g_format_size_for_display() because
    the latter is deprecated.

 app/actions/edit-commands.c             |    2 +-
 app/core/gimpimagefile.c                |    2 +-
 app/dialogs/image-new-dialog.c          |    4 ++--
 app/dialogs/image-scale-dialog.c        |    4 ++--
 app/display/gimpdisplayshell-title.c    |    5 +----
 app/widgets/gimpimagepropview.c         |    7 +++----
 app/widgets/gimptemplateeditor.c        |    2 +-
 app/widgets/gimpthumbbox.c              |    2 +-
 libgimpbase/gimpmemsize.c               |    6 +++---
 plug-ins/file-jpeg/jpeg-save.c          |    2 +-
 plug-ins/file-uri/uri-backend-gvfs.c    |    6 +++---
 plug-ins/file-uri/uri-backend-libcurl.c |    4 ++--
 plug-ins/file-uri/uri-backend-wget.c    |    4 ++--
 13 files changed, 23 insertions(+), 27 deletions(-)