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 562334 - 2.18.2 break libglade on Solaris
2.18.2 break libglade on Solaris
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.18.x
Other Solaris
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-11-26 13:31 UTC by Jörn Clausen
Modified: 2017-11-16 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implements comment 3 solution (775 bytes, patch)
2013-11-07 10:11 UTC, Patrick Welche
committed Details | Review

Description Jörn Clausen 2008-11-26 13:31:23 UTC
After upgrading glib2 to 2.8.12/13 (I am using pkgsrc), compilation of libglade fails with

 gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"libglade\" -I.. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/pkgsrc/pkgsrc-cvs/include/libxml2 -I/usr/local/pkgsrc/pkgsrc-cvs/include -I/usr/local/pkgsrc/pkgsrc-cvs/include/atk-1.0 -I/usr/local/pkgsrc/pkgsrc-cvs/include/glib/glib-2.0 -I/usr/local/pkgsrc/pkgsrc-cvs/lib/glib-2.0/include -I/usr/local/pkgsrc/pkgsrc-cvs/include/gtk-2.0 -I/usr/local/pkgsrc/pkgsrc-cvs/lib/gtk-2.0/include -I/usr/local/pkgsrc/pkgsrc-cvs/include/cairo -I/usr/local/pkgsrc/pkgsrc-cvs/include/pango-1.0 -I/usr/local/pkgsrc/pkgsrc-cvs/include/pixman-1 -I/usr/local/pkgsrc/pkgsrc-cvs/include/freetype2 -I/usr/local/pkgsrc/pkgsrc-cvs/include/libpng12 -DGLADE_LIBDIR=\"/usr/local/lib\" -DGLADE_PREFIX=\"/usr/local\" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -I/usr/local/pkgsrc/pkgsrc-cvs/include -g -O2 -Wall -std=c9x -MT glade-init.lo -MD -MP -MF .deps/glade-init.Tpo -c glade-init.c  -fPIC -DPIC -o .libs/glade-init.o
In file included from /usr/local/pkgsrc/pkgsrc-cvs/include/glib/glib-2.0/glib/gbacktrace.h:35,
                 from /usr/local/pkgsrc/pkgsrc-cvs/include/glib/glib-2.0/glib.h:36,
                 from glade-init.c:27:
/usr/include/signal.h:201: error: syntax error before '*' token

The change in gbacktrace.h since 2.18.0 (which worked for Solaris) seems to be the unconditional inclusion of signal.h. Removing this include again solves the compilation problem.
Comment 1 Matthias Clasen 2008-11-28 06:13:30 UTC
What is the problem in the Solaris signal.h header, then ?

Comment 2 Jörn Clausen 2008-11-28 07:56:11 UTC
I don't think there is a "problem" with signal.h. As far as I can tell, it's just not needed. I have commented it out and continued building several packages that depend on it.

The problematic part is the declaration of sigwait - which I think I can't post here, there's a big fat AT&T disclaimer at the top of signal.h. At the moment I don't have access to an OpenSolaris machine, but I can look it up there later.
Comment 3 James Andrewartha 2009-04-13 03:35:33 UTC
On Solaris, /usr/include/signal.h has:
#if     (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
#ifdef __PRAGMA_REDEFINE_EXTNAME
#pragma redefine_extname sigwait __posix_sigwait
extern int sigwait(const sigset_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);

The problem is sigset_t is only defined in /usr/include/sys/signal.h (included from /usr/include/signal.h) if _XPG4_2 is defined. If it's not defined, you need to include /usr/include/sys/select.h.

So the fix is to add #include <sys/select.h> to gbacktrace.h on Solaris.
Comment 4 Patrick Welche 2013-11-07 10:11:27 UTC
Created attachment 259166 [details] [review]
Implements comment 3 solution

The suggested fix from comment 3 has been in pkgsrc since 2009/04/13. OK to commit?
Comment 5 Patrick Welche 2016-03-12 09:12:04 UTC
2.5 years on - OK to commit?
Comment 6 Philip Withnall 2017-11-16 10:36:00 UTC
Review of attachment 259166 [details] [review]:

Sure. Sorry for the delay in reviewing.
Comment 7 Patrick Welche 2017-11-16 13:16:59 UTC
Thanks for the review and committing it.

https://git.gnome.org/browse/glib/commit/?id=b5733ecc76d8b80a78bfd35406b66a5217b60f20