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 793057 - glib-genmarshal aliasing changes (commit #4b661ad222) has broken compilation for gtk-2
glib-genmarshal aliasing changes (commit #4b661ad222) has broken compilation ...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.24.x
Other Windows
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2018-01-31 10:37 UTC by John E
Modified: 2018-03-18 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description John E 2018-01-31 10:37:54 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 !!)
Comment 1 John E 2018-02-04 14:14:34 UTC
Just wondering if anyone's managed to reproduce this?
Comment 2 Emmanuele Bassi (:ebassi) 2018-02-05 16:55:11 UTC
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.
Comment 3 John E 2018-02-10 09:20:27 UTC
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.
Comment 4 John E 2018-02-10 09:34:30 UTC
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"
Comment 5 Emmanuele Bassi (:ebassi) 2018-02-10 18:56:55 UTC
Yes, the real issue is the commit in gtk-2-24 that added those symbols.
Comment 6 Emmanuele Bassi (:ebassi) 2018-02-10 19:05:09 UTC
I've reverted the commit that added the symbols in the gtk-2-24 branch.
Comment 7 John E 2018-02-11 11:35:05 UTC
Thanks Emmanuele - I re-tested this morning and gtk-2-24 is now building fine again with MSVC.