Incompatibility with Tk (Was Re: More release 2.3.0 problems)
Incompatibility with Tk (Was Re: More release 2.3.0 problems)
- Subject: Incompatibility with Tk (Was Re: More release 2.3.0 problems)
- From: Martin Costabel <email@hidden>
- Date: Sat, 26 Jul 2008 22:17:55 +0200
Wes Turner wrote:
I hate to pile on, but I installed rc7 last week and didn't have any
problems. Our application uses tcl/tk and today I needed to upgrade the
tcl/tk version and recompile. I get the attached error and the program
fails to run
Yes, compiling tcltk with xquartz-2.3.0 installed breaks Tk. The
simplest way to trigger the error is the command
tclsh <prefix>/lib/tk8.4/tk.tcl
or simply run "wish".
The reason for the breakage is a change in X11/X.h. The new version in
xquartz-2.3.0 has
#define LASTEvent 36
whereas previous versions had
#define LASTEvent 35
(According to
<http://lists.freedesktop.org/archives/xcb/2006-November/002314.html>
this had not changed for 20 years and was not supposed to change in the
near future).
If you compile tkBind.c against the new version of X.h, you get a
libtk8.4.dylib with the breakage, if you compile it against the old
version or simply modify X.h while compiling, there is no breakage.
This number 35 for LASTEvent is hardcoded in the length of static arrays
in tkBind.c and tkEvent.c. The number 35 is also #defined in tcltk's own
xlib/X11/X.h, but during compilation it is the X.h from /usr/X11, not
the one from tk8.4/xlib/, which is used.
I found a discussion on a tcl mailing list
<http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/3a3fedad45fecc51>
and a bug report
<http://sourceforge.net/tracker/index.php?func=detail&aid=2010422&group_id=12997&atid=112997>
It is clear that the tcltk guys have to react to this catastrophe, but
there doesn't seem to exist any convincing fix yet. The bug report has a
patch, but its discussion isn't very favorable.
--
Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden