Red Hat Bugzilla – Bug 227951
tcl_findLibrary is not thorough enough
Last modified: 2008-01-18 03:19:03 EST
Description of problem:
The tcl_findLibrary procedure is used to locate a packages foo.tcl script by
looking in a few common locations. Unfortunately, it does not look in the
sibling directory of Tcl's own script library. This causes problems for Tk when
Tcl is built with a restricted auto_path (see bug #226893)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Rebuild and install Tcl with the auto_path patch in bug #226893
2. Install Tk
3. Start a wish shell
wish does not initialize correctly and gives the following error:
"Application initialization failed: Can't find a usable tk.tcl in the following
/usr/share/tcl8.5/tk8.5 /usr/lib/tk8.5 /lib/tk8.5 /usr/library
This probably means that tk wasn't installed properly."
Note that it does _not_ look in /usr/share/tk8.5, where tk.tcl actually lives.
wish starts as expected
The attached patch adds an additional directory, $tcl_library/../foo$version to
the search path.
I'm also sending this patch to the upstream devs so that it can get included in
the core Tcl sources.
Created attachment 147722 [details]
update tcl_findLibrary procedure in auto.tcl
This patch updates the tcl_findLibrary procedure in auto.tcl, which is used by
Tk to find tk.tcl.
Thanks for patch.
It has to wait for new version 8.5.
Upstream acknowledges the problem, and proposes a slightly more complicated fix:
This patch should be considered a workaround until the above upstream bug is fixed.
fixed in tcl-1:8.5.0-6