Cannot compile xfig - X11 libs broken?

From: Lars Hecking (lhecking@nmrc.ucc.ie)
Date: Thu May 29 2003 - 10:24:59 EDT


 This list is probably not the right target audience for this, but as I have
 no direct contact with Sun developers, I might as well try here :)

 It has become increasingly difficult in the past few years to compile new
 versions of xfig on Solaris 7/8/9. While this could be worked around one way
 or another, the current xfig version 3.2.4d cannot be made to run under
 Solaris, and the evidence points to Sun's X11 libs.

 Details
 -------

 1. Compile failure
gcc -c -O2 -I/usr/include/X11 -I/usr/local/include -I/usr/local/include/X11 -I/usr/local/include/X11/Xaw3d -I/usr/openwin/include -Dsun -Dsparc -DSVR4 -DSYSV -DUSE_XPM -DXAW3D -DUSE_JPEG w_menuentry.c
w_menuentry.c: In function `Redisplay':
w_menuentry.c:135: structure has no member named `fontset'
...

 The corresponding code:

134 #if (XtVersion >= 11006)
135 XFontSetExtents *ext = XExtentsOfFontSet(entry->sme_bsb.fontset);
136 #endif /* XtVersion R6 */

 XtVersion is defined in /usr/openwin/include/X11/IntrinsicP.h to 11006
 (via XT_VERSION and XT_REVISION). This is clearly wrong, as libXt apparently
 doesn't provide features included in X11R6.

 This causes more serious compile errors in other places. The xfig maintainer
 sent me a patch for these, and by explicitly defining XtVersion to 11005,
 xfig can now be compiled.

 2. Core dump

 Running xfig results in a core dump as soon as one tries to do anything.
 Here's a backtrace:

#0 0xfee9f7cc in _libc_kill () from /usr/lib/libc.so.1
#1 0xfee358f4 in abort () from /usr/lib/libc.so.1
#2 0x0010c400 in goodbye (abortflag=1 '\001') at w_cmdpanel.c:538
#3 0x000c7314 in emergency_quit (abortflag=1 '\001') at u_error.c:98
#4 0x000c7070 in error_handler (err_sig=11) at u_error.c:52
#5 <signal handler called>
#6 0xff03953c in XDrawLine () from /usr/lib/libX11.so.4
#7 0x00106ce0 in Redisplay (w=0x2dbb28, event=0x0, region=0x0)
    at w_menuentry.c:250
#8 0x001d1620 in Redisplay (w=0x2db8c0, event=0xffbef840, region=0x2c3a88)
    at SimpleMenu.c:337
#9 0xff1aee2c in SendExposureEvent () from /usr/lib/libXt.so.4
#10 0xff1aec68 in CompressExposures () from /usr/lib/libXt.so.4
#11 0xff1ad82c in XtDispatchEventToWidget () from /usr/lib/libXt.so.4
#12 0xff1ad1b0 in _XtDefaultDispatcher () from /usr/lib/libXt.so.4
#13 0xff1aced8 in XtDispatchEvent () from /usr/lib/libXt.so.4
#14 0x000a6b54 in main (argc=1, argv=0xffbef93c) at main.c:1501

 And here is what the xfig maintainer has to say about it:

> I have heard of this happening on other Sun systems too. The problem may be
> that they have changed the internals of the intrinsics (libXt) such that
> programs that depend on the structure crash. xfig depends on the structure
> because I have added a few features to the menu widget (underlining a letter
> in the menu entries) and to the list widget (scrolling with the arrow keys).
> The only thing I can suggest at this point is to get a more "standard" libXt
> and libXaw from ftp.x.org and try installing and linking xfig to that.
> Sorry it isn't any easier.

 Any ideas are appreciated. I am not an X11 programmer, so I'm kind of at
 a loss here. I could get X11R6 libs and link them statically, but I'd
 prefer not.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:29 EDT