swarm-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [swarm-hackers] fedora 11, tcl/tk 8.5: Some actual news!


From: Paul Johnson
Subject: Re: [swarm-hackers] fedora 11, tcl/tk 8.5: Some actual news!
Date: Thu, 23 Jul 2009 19:46:00 -0500
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

OK, I made some progress on tcl/tk. I *believe* Swarm is not incompatible with tcl/tk 8.5. batch programs run fine.
After a lot of random bumping around in the dark today, I found a bug
report (https://bugzilla.redhat.com/show_bug.cgi?id=504388) to indicate
that this crash

$ ./heatbugs
X Error of failed request:  BadMatch (invalid parameter attributes)
Major opcode of failed request:  151 (RENDER)
Minor opcode of failed request:  4 (RenderCreatePicture)
Serial number of failed request:  3758
Current serial number in output stream:  3764


is caused by a bug in tcl/tk 8.5 that is triggered by usage of Tk_DrawChars() in blt. I gather that one of the significant improvements in tk 8.5 is support for xft fonts, and it turns out that the bug is caused by usage of xft fonts. That bug report is dated July 12, 2009, so I am encouraged to learn other people have found the same.

The workaround for now is to recompile tcl/tk with --disable-xft. That makes the fonts uglier, but after that Swarm programs do not crash anymore!

There is an example tcl program in that note that can be used to test blt and tk.

It is simple. Put this in a file "blttest.tcl"

#! /usr/bin/wish
package require Tclx
package require BLT
namespace import blt::*
tabset .ts -side left -rotate 90 -activebackground green
.ts insert end .tstab -text "Test"
pack .ts


Then run "wish blttest.tcl" and if it crashes, you are using a system that has the bug.

I've had this "success" with swarm-2.2.5.

Right now, I'm uploading the RPMS I've built for tk and swarm. I rebuilt tcl, but I do not think it was strictly necessary. But I'm uploading it anyway. It may also be I need to upload blt in order for this to work on other systems, we will have to test.

http://pj.freefaculty.org/Swarm/Swarm-2.2X_F11

There you should find these files:

$ ls Swarm-2.2X_F11/ -la
total 19076
drwxrwxr-x  2 pauljohn32 pg512501    4096 2009-07-23 17:25 .
drwxr-xr-x 21 pauljohn32 pg512501    4096 2009-07-23 17:23 ..
-rw-r--r-- 1 pauljohn32 pg512501 1051351 2009-07-23 17:24 swarm-2.2.5-2F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 3449459 2009-07-23 17:24 swarm-debuginfo-2.2.5-2F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 532786 2009-07-23 17:24 swarm-gcjswarm-2.2.5-2F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 1700573 2009-07-23 17:24 swarm-jdk-2.2.5-2F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 1293736 2009-07-23 17:24 swarm-static-2.2.5-2F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 2335448 2009-07-23 17:25 tcl-8.5.6-7F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 2609968 2009-07-23 17:25 tcl-debuginfo-8.5.6-7F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 178332 2009-07-23 17:25 tcl-devel-8.5.6-7F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 1598296 2009-07-23 17:25 tk-8.5.6-5F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 4160755 2009-07-23 17:25 tk-debuginfo-8.5.6-5F11kups.i586.rpm -rw-r--r-- 1 pauljohn32 pg512501 543054 2009-07-23 17:25 tk-devel-8.5.6-5F11kups.i586.rpm

If your swarm programs crash after installing these, it is *almost certainly* because the blt you have is not the same as the one that I have. Here's what you need to do. Keep the blt for tk8.5 provided with F11, but then you need to add a symbolic link.

Check this directory:

/usr/share/tcl8.5/blt2.4

see if you have a symbolic link from graph.tcl to bltGraph.tcl. you probably do not, and you need one. So do

ln -sf /usr/share/tcl8.5/blt2.4/graph.tcl /usr/share/tcl8.5/blt2.4/bltGraph.tcl

I'll probably make a new blt RPM that does that automatically, as I have done in the past, for tcl/tk 8.4.

It appeared to me a few years ago that tcl/tk would completely die, but now it is pretty heavily used by some really cool projects, including Swarm and R, and thus I believe they will fix it and we will soon have anti-aliased fonts.

Apparently, this problem has been known since 2007, however, and that is a bit discouraging. Joe English, one of the Tk maintainers, says this "The preferred solution is to not call Tk_DrawChars() on drawables of depth 1. This is preferable in any event, so that compositing will work." (http://objectmix.com/tcl/303826-8-5b3-linked-against-x11.html) It could be that means they will refuse to fix Tk, and blt will have to change, in which case Swarm's usage may break. Oh, well. Details like that are above my level of understanding.



pj




--
Paul E. Johnson                       email: address@hidden
Professor, Political Science          http://pj.freefaculty.org
1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700





reply via email to

[Prev in Thread] Current Thread [Next in Thread]