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 766388 - gobject_init_ctor (gtype.c) gets optimized out
gobject_init_ctor (gtype.c) gets optimized out
Status: RESOLVED DUPLICATE of bug 752837
Product: glib
Classification: Platform
Component: gobject
2.40.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-05-13 17:33 UTC by Guy Sherman
Modified: 2016-05-16 14:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guy Sherman 2016-05-13 17:33:27 UTC
I was building Pango (and all the necessary deps, hence glib) under Visual Studio 2015 and I hit an issue:

gobject_init_ctor (gtype.c:4316) seemed to get optimized out under the default Release configuration. I worked around it by disabling optimizations in the project which builds gobject.lib/gobject-***.dll

The symptom I was experiencing was that as soon as pango tried to declare a type using GObject I would hit an assert to do with the type system not being initialized. I built my own tiny dll library, lifting D_DECLARE_CONSTRUCTOR to create my own simple constructor and that worked fine. Switching to debug worked, so finally I turned off optimizations for that library and it worked in release as well. 

Haven't a clue why it is getting optimized out, but figured I'd let y'all know.
Comment 1 Guy Sherman 2016-05-13 17:34:44 UTC
For reference the specific compiler version is 19.00.23918 (which comes from Visual Studio 2015 Update 2).
Comment 2 Allison Karlitskaya (desrt) 2016-05-16 12:19:45 UTC
hi Guy,

We do regular builds on various different versions of Visual Studio on Windows, and this issue is not something that we've been experiencing.

Is there anything unique about your configuration that might be making a difference here?
Comment 3 Fan, Chun-wei 2016-05-16 14:28:08 UTC
Hi Guy,

It does seem that you are using an older version of GLib, as this issue was resolved in 2.46.1, and g_init_ctor() is not used on Windows builds (See bug 752837).  If your GLib version is 2.46.1 or later, let me know.

With blessings, and cheers!

*** This bug has been marked as a duplicate of bug 752837 ***