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 797310 - Fails to compile
Fails to compile
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-editing-services
unspecified
Other Linux
: Normal blocker
: 1.14.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-19 19:42 UTC by Sebastian Dröge (slomo)
Modified: 2018-10-22 07:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2018-10-19 19:42:15 UTC
This is with GLib 2.58.1 and gcc 8.2.0. I'm not sure what the actual problem here is.


In file included from /usr/include/glib-2.0/glib/glist.h:32,
                 from /usr/include/glib-2.0/glib/ghash.h:33,
                 from /usr/include/glib-2.0/glib.h:50,
                 from ges.h:24,
                 from ges-base-xml-formatter.c:21:
ges-base-xml-formatter.c: In function ‘_dispose’:
ges-base-xml-formatter.c:352:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
ges-base-xml-formatter.c:353:39: error: function called through a non-compatible type [-Werror]
   g_clear_pointer (&priv->containers, (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
ges-base-xml-formatter.c:354:44: error: function called through a non-compatible type [-Werror]
   g_clear_pointer (&priv->clipid_pendings, (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
ges-base-xml-formatter.c:355:35: error: function called through a non-compatible type [-Werror]
   g_clear_pointer (&priv->tracks, (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
ges-base-xml-formatter.c:356:35: error: function called through a non-compatible type [-Werror]
   g_clear_pointer (&priv->layers, (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
In file included from /usr/include/glib-2.0/glib/glist.h:32,
                 from /usr/include/glib-2.0/glib/ghash.h:33,
                 from /usr/include/glib-2.0/glib.h:50,
                 from ges.h:24,
                 from ges-xml-formatter.c:28:
ges-xml-formatter.c: In function ‘_dispose’:
ges-xml-formatter.c:1635:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~
Comment 1 Edward Hervey 2018-10-22 06:27:13 UTC
Most likely related to this change : https://gitlab.gnome.org/GNOME/glib/issues/1425

Remove the cast to GDestroyNotify should fix the issue
Comment 2 Sebastian Dröge (slomo) 2018-10-22 07:15:29 UTC
Thanks, that fixes it indeed.

commit ee7c2d07b86aad60edf4aad77174c583c90e67de (HEAD -> master, origin/master, origin/HEAD)
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Oct 22 08:13:07 2018 +0100

    ges: Fix compilation with latest GLib
    
    g_clear_pointer() is now preserving the type of its arguments for the
    free function.
    
    ges-xml-formatter.c: In function ‘_dispose’:
    ges-xml-formatter.c:1635:7: error: function called through a non-compatible type [-Werror]
           (GDestroyNotify) g_hash_table_unref);
    /usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
           (destroy) (_ptr);                                                        \
            ^~~~~~~
    
    https://bugzilla.gnome.org/show_bug.cgi?id=797310
Comment 3 Edward Hervey 2018-10-22 07:56:12 UTC
And backported to 1.14