I recently installed tcl/tk 8.0.5 on a FreeBSD2.2.8 system using the
FreeBSD ports collection.
Running wish8.0 gives me the following error:
Application initialization failed: invalid command name "tcl_findLibrary"
%
Can someone enlighten me as to what is causing that or how it might be fixed?
Any help is much appreciated.
Thanks,
-steve
It looks like your 8.0.5 compiled Tcl executable is finding a pre-8.0.3
runtime Tcl library directory before the correct 8.0.5 one.
tcl_findLibrary was added in 8.0.3 to the runtime Tcl code libraries.
This ended up confusing things, because if you tried to run a newer
Tcl with an older 8.0 still installed, the executable would often
find the old init.tcl first and barf as above.
** Jeffrey Hobbs jeff.hobbs @SPAM acm.org **
** I'm really just a Tcl-bot My opinions are MY opinions **
When an application which contains the Tcl library (like wish) starts
up, a routine Tcl_Init() is called. This causes the Tcl library to seek
out a file named 'init.tcl' and evaluate the Tcl commands it contains
as part of the Tcl library's initialization process.
The error you report occurs when an application contains the 8.0.y
(y >= 3) release of the Tcl library, but Tcl_Init() finds the init.tcl
file which came with the 8.0px (x < 3) release of Tcl.
One common cause of such a version mismatch is that you have the
environment variable TCL_LIBRARY set to the name of the directory
containing the old 'init.tcl' -- effectively forcing your new
Tcl installation to erroneously use the old initialization scripts.
If you find that to be the case, first try unsetting TCL_LIBRARY
entirely. Only if that fails should you set TCL_LIBRARY to the
location of the new init.tcl, or you'll have problems again
the next time you upgrade. A proper Tcl installation shouldn't
require TCL_LIBRARY to be set. TCL_LIBRARY should be set only to
work around mis-installations.
--
| Don Porter, D.Sc. Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/mcsd/Staff/DPorter/ NIST |
|______________________________________________________________________|