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 763560 - Constructors on AIX
Constructors on AIX
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: general
2.46.x
Other AIX
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-03-13 03:37 UTC by The Written Word
Modified: 2018-05-24 18:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Constructor patch for AIX (3.36 KB, patch)
2016-03-13 03:37 UTC, The Written Word
none Details | Review
Updated patch (2.73 KB, patch)
2016-03-15 20:37 UTC, The Written Word
none Details | Review

Description The Written Word 2016-03-13 03:37:43 UTC
Created attachment 323776 [details] [review]
Constructor patch for AIX

I have a build of glib-2.46.2 on AIX that has constructors working. Supporting constructors on this platform is problematic because you need the support of the compiler and the linker.

I have attached a patch of my work. Explanations:
  1. The constructor/destructor must not be static. Maybe we
     redefine G_DEFINE_DESTRUCTOR to G_DEFINE_DESTRUCTOR_PROTO and then
     use G_DEFINE_DESTRUCTOR in the .c file to define the constructor?
     We could then continue with the preprocessor-like method in
     glib/gconstructor.h and support static-less constructors on AIX.
  2. The library with the constructor must be linked with
     -Wl,-binitfini:<constructor>:<destructor>. I added AIX_LDFLAGS
     to glib/Makefile.am and gobject/Makefile.am for manual massaging
     at build time. We could fix this in configure.ac as well.
Comment 1 The Written Word 2016-03-15 20:37:28 UTC
Created attachment 324043 [details] [review]
Updated patch
Comment 2 Tony Reix 2016-04-19 16:13:10 UTC
Hi
I'm now trying to port version 2.48.0 of Glib on AIX 6.1. For BullFreeware.
We want to deliver a new version of GTK+ v2 and then v3. Huge work.
And I'm facing and discovering this damned issue with GLib.
I will have a look at your patch tomorrow.
Regards,
Tony
Comment 3 The Written Word 2016-06-06 18:36:53 UTC
(In reply to Tony Reix from comment #2)
> I'm now trying to port version 2.48.0 of Glib on AIX 6.1. For BullFreeware.
> We want to deliver a new version of GTK+ v2 and then v3. Huge work.
> And I'm facing and discovering this damned issue with GLib.
> I will have a look at your patch tomorrow.

Did the patch work for you?
Comment 4 Tony Reix 2016-06-08 16:04:14 UTC
Yes ! It worked perfectly well ! Thanks !
And we have just fixed another issue dealing with libiconv in our .spec file for 64bits.
Comment 5 GNOME Infrastructure Team 2018-05-24 18:41:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1147.