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 583618 - must link directly to libXext on Solaris
must link directly to libXext on Solaris
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
git master
Other Solaris
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-23 03:59 UTC by James Andrewartha
Modified: 2010-05-07 15:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description James Andrewartha 2009-05-23 03:59:40 UTC
On Solaris, you have to explicitly link to libraries whose symbols you use.
Simply linking against gtk which then links to libXext works on Linux, but not
Solaris. The solution is to add PKG_CHECK_MODULES(XEXT, xext) and
substituting the appropriate variables.

Undefined                     first referenced
 symbol                             in file
XSyncDestroyAlarm                   gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
XSyncFreeSystemCounterList          gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
XSyncChangeAlarm                    gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
XSyncInitialize                     gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
XSyncQueryExtension                 gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
XSyncListSystemCounters             gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
XSyncCreateAlarm                    gs-idle-monitor.o  (symbol belongs to implicit dependency /usr/X11/lib/libXext.so.0)
Comment 1 Daniel Macks 2009-06-13 18:52:13 UTC
OS X has same build failure.
Comment 2 Daniel Macks 2009-06-13 19:00:08 UTC
It's only by luck that compiling even gets this far I think. ./configure already tests for X11/extensions/sync.h:

>have_xsync=no
>AC_CHECK_HEADER(X11/extensions/sync.h, [have_xsync=yes],,
>                    [#include <X11/Xlib.h>])
>if test "$have_xsync" = yes; then
>  AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library])
>fi

but the gs-idle-monitor.c #inlude of sync.h and the use of its features is not conditioned on HAVE_XSYNC, so probably megafail if it doesn't exist. Secondarily, that AC_CHECK_HEADER and AC_DEFINE is reinventing a wheel: AC_CHECK_HEADERS does it all for you with a clearer, self-documented AC_DEFINE token.
Comment 3 Colin Walters 2010-05-07 15:15:12 UTC
commit b7926c7bada91a333e2c49da83808589191b8a8f
Author: Colin Walters <walters@verbum.org>
Date:   Fri May 7 11:10:42 2010 -0400

    Explicitly add -lXext -lXau to linker line
    
    Newer versions of GCC require all libraries to be explicitly
    specified.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=583618