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 701897 - glib 2.36.x won't build on Solaris and derivatives
glib 2.36.x won't build on Solaris and derivatives
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: build
2.36.x
Other Solaris
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 697017 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-06-09 13:49 UTC by Peter Tribble
Modified: 2018-05-24 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Tribble 2013-06-09 13:49:32 UTC
The fix for 682818 breaks compilation of GLib on Solaris and Illumos derivatives (such as OpenIndiana) that still have gcc3 as their compiler.

Files fail to link with

Undefined                       first referenced
 symbol                             in file
__sync_synchronize                  ./.libs/libglib-2.0.so
__sync_bool_compare_and_swap        ./.libs/libglib-2.0.so
__sync_fetch_and_or                 ./.libs/libglib-2.0.so
__sync_fetch_and_add                ./.libs/libglib-2.0.so
__sync_fetch_and_and                ./.libs/libglib-2.0.so
__sync_fetch_and_sub                ./.libs/libglib-2.0.so
__sync_fetch_and_xor                ./.libs/libglib-2.0.so

The problem is that __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is now defined without any checking, and there are platforms for which it isn't actually true.

(This also appears to break the test for G_ATOMIC_LOCK_FREE, which now passes when it shouldn't.)
Comment 1 Igor Pashev 2013-07-23 13:35:55 UTC
OpenIndiana has gcc 4
Comment 2 Alan Hourihane 2013-11-10 17:06:03 UTC
This turns out to be a problem in configure.ac. The AC_TRY_COMPILE test for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is reversed and is...

      AC_TRY_COMPILE([],
                     [__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;],
                     [],
                     [AC_DEFINE(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, 1, [ compiler supports atomic operations])])

where it should be....

      AC_TRY_COMPILE([],
                     [__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;],
                     [AC_DEFINE(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, 1, [ compiler supports atomic operations])],
                     [])
Comment 3 Matthias Clasen 2013-11-23 16:06:54 UTC
That is a misunderstanding - what this snipplet is supposed to do is define
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 if it isn't already. There must be something going wrong with the atomics detection earlier.
Comment 4 Matthias Clasen 2013-11-23 16:08:38 UTC
*** Bug 697017 has been marked as a duplicate of this bug. ***
Comment 5 GNOME Infrastructure Team 2018-05-24 15:24:41 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/713.