|
2007-02-09
| ||
| 22:46 | • Closed ticket [1655677fff]: tcl_findLibrary is not thorough enough plus 7 ot... artifact: 691aec65e2 user: dgp | |
| 16:05 | • Ticket [1655677fff]: 6 changes artifact: 583c2e84dd user: dkf | |
| 08:38 | • Ticket [1655677fff]: 4 changes artifact: 7c7b4f7985 user: wart | |
| 08:38 | • Add attachment tcl-8.5a5-findlibrary.patch to ticket [1655677fffffffff|... artifact: d11d8db7df user: wart | |
| 01:38 | • New ticket [1655677fff] tcl_findLibrary is not thorough enough. artifact: c91c404a93 user: wart | |
tcl_findLibrary is not thorough enough
Closed / Invalid1655677fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2007-02-09 01:38:45
Let me preface by stating that this only causes problems when running Tcl with a slightly stripped-down auto_path. I realize this is a non-standard configuration, but hope that the solution makes sense in the general case as well. 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. One directory that is not used in this search is the sibling of [::tcl::pkgconfig get scriptdir,runtime]: set value [::tcl::pkgconfig get scriptdir,runtime] [file join [file dirname $value] $basename$version] For example, if Tcl's script library is installed in /usr/share/tcl8.5, then tcl_findLibrary should look for foo's script library in /usr/share/foo8.5. This is not an issue in the standard Tcl/Tk installation because tcl_findLibrary also searches in subdirectories of auto_path, which includes the massive /usr/lib and /usr/share directories. But if Tcl is used with a restricted auto_path containing only /usr/share/tcl8.5 and /usr/lib/tcl8.5, then it won't find tk's tk.tcl in /usr/share/tk8.5. Also note that the following comment in $tk_src_dir/generic/tkInitScript.h is incorrect, $tcl_library/../tk$tk_version is _not_ a directory that is searched: " * In order to find tk.tcl during initialization, the following script is * invoked by Tk_Init(). It looks in several different directories: * * $tk_library - can specify a primary location, if set no * other locations will be checked * * $env(TK_LIBRARY) - highest priority so user can always override * the search path unless the application has * specified an exact directory above * * $tcl_library/../tk$tk_version * - look relative to init.tcl in an installed * lib directory (e.g. /usr/local) "
wartplain2007-02-09 08:38:45
File Added - 215155: tcl-8.5a5-findlibrary.patch
dkfplain2007-02-09 16:05:07
data_type - 360894
dgpplain2007-02-09 22:46:15
Logged In: YES
user_id=80530
Originator: NO
The bug here is in Tk, and
the solution is the same
solution that will fix
Tk Bug 765642.
[tcl_findLibrary] searches in
[::${basename}::pkgconfig get scriptdir,runtime]
so all Tk needs to do is use the provided
Tcl_RegisterConfig() routine to record where
its script library has been installed, and
this problem will be corrected.
re-open this issue in the Tk Bug Tracker
and give it a high prio. The issue with
the out of date comment needs resolving
there as well.
Log in (anonymous is fine) to add a comment.
Attachments:
- tcl-8.5a5-findlibrary.patch [download] added by wart on 2007-02-09 08:38:45. [details]