GNOME Bugzilla – Bug 793057
glib-genmarshal aliasing changes (commit #4b661ad222) has broken compilation for gtk-2
Last modified: 2018-03-18 19:47:18 UTC
This change was recently introduced to fix a build problem with glib:- https://git.gnome.org/browse/glib/commit/?id=bf0be21208800d7976b5a660287e1e487f8a57d3 Unfortunately, there's been a side-effect when trying to build gtk-2-24. gtk-2-24 needs to run glib-genmarshal (from glib) but when it runs the newer version, 'gtk/gtkmarshal.c' gets generated without the following function bodies present:- gtk_marshal_VOID__BOOLEAN gtk_marshal_VOID__BOXED gtk_marshal_VOID__ENUM gtk_marshal_VOID__INT gtk_marshal_VOID__OBJECT gtk_marshal_VOID__POINTER gtk_marshal_VOID__STRING gtk_marshal_VOID__UINT gtk_marshal_VOID__VOID Reverting glib's commit 4b661ad222 fixes the problem (though obviously, it'll then have a side-effect on glib !!)
Just wondering if anyone's managed to reproduce this?
This is not actually a change. Before commit 4b661ad222, the Python rewrite of glib-genmarshal would create too many marshallers — even for the aliases of marshallers provided by GObject. gtk_marshal_VOID__BOOLEAN is really an alias for g_cclosure_marshal_VOID__BOOLEAN(), which is part of the GObject ABI. I've just tested with glib-genmarshal from GLib 2.50.0 (prior to the rewrite) and it correctly creates gtk_marshal_VOID__* and friends as pre-processor aliases to the corresponding g_cclosure_marshal_*: ``` /* NONE:BOOL (./gtkmarshal.list:10) */ #define gtk_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN #define gtk_marshal_NONE__BOOL gtk_marshal_VOID__BOOLEAN /* NONE:BOXED (./gtkmarshal.list:11) */ #define gtk_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED #define gtk_marshal_NONE__BOXED gtk_marshal_VOID__BOXED /* NONE:ENUM (./gtkmarshal.list:12) */ #define gtk_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM #define gtk_marshal_NONE__ENUM gtk_marshal_VOID__ENUM ``` The issue you're experiencing may be caused by an intermediate build with a Python glib-genmarshal from prior to commit 4b661ad222, but that would be the regression that was fixed by said commit.
Thanks for looking into this Emmanuele and sorry for the delay in replying. Taking gtk_marshal_VOID__BOOLEAN as an example, you said that it's simply an alias for g_cclosure_marshal_VOID__BOOLEAN (i.e. gtk_marshal_VOID__BOOLEAN shouldn't exist as a function body in its own right). If that's the case, then we're back to the problem I originally reported on the gtk mailing list, namely:- " On 8th Jan, the following symbols got added to 'gtk/gtk.symbols' by commit 331877fe36:- gtk_marshal_VOID__BOOLEAN gtk_marshal_VOID__BOXED gtk_marshal_VOID__ENUM gtk_marshal_VOID__INT gtk_marshal_VOID__OBJECT gtk_marshal_VOID__POINTER gtk_marshal_VOID__STRING gtk_marshal_VOID__UINT gtk_marshal_VOID__VOID " Assuming the above names aren't real actual functions, then we shouldn't be trying to export them from a DLL... Either there's something wrong with commit 4b661ad222 or something's wrong with commit 331877fe36. They can't both be right.
For some reason my link to commit 331877fe36 doesn't seem to work. However, it was committed by Matthias (to gtk-2-24) on 8th Jan 2018 and has the comment:- "Fix abicheck. Update symbols files, and ignore marshallers that appear"
Yes, the real issue is the commit in gtk-2-24 that added those symbols.
I've reverted the commit that added the symbols in the gtk-2-24 branch.
Thanks Emmanuele - I re-tested this morning and gtk-2-24 is now building fine again with MSVC.