f



"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4" caused by replacing Tcl 8.4.1 with 8.5.7

In the blog

http://planet.larrythecow.org/archives/2009-07-26.html

"The Twouble with Tcl" Iain Buchanan
shows that redefining OPEN proc leads to the
errors similar to what I am getting - when I replaced Tcl 8.4.1 with
Tcl
8.5.7.
In my case I don't know the exact root cause though ...
Any ideas how I should proceed with debugging this issue ?

Thanks,
Alex

tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o
symTbl.c
invalid command name "::tcl::tm::UnknownHandler"
    while executing
"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4"
    ("package unknown" script)
    invoked from within
"package require msgcat 1.4"
    ("uplevel" body line 2)
    invoked from within
"uplevel \#0 {
    package require msgcat 1.4
    if { $::tcl_platform(platform) eq {windows} } {
        if { [catch { package require registry 1.1 }] } {
         ..."
    (file "C:/Tornado/host/x86-win32/lib/tcl8.5/clock.tcl" line 23)
    invoked from within
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
    (procedure "::tcl::clock::format" line 3)
    invoked from within
"clock format [clock seconds]"
    invoked from within
"puts $makeSymTbl::fdOut " *         ON [clock format [clock
seconds]]""
    (file "c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl" line
334)
make: *** [vxWorks.st] Error 1


0
Alexander
1/4/2010 1:44:22 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

11 Replies
2299 Views

Similar Articles

[PageSpeed] 47

Alexander R.Povolotsky wrote:
> Any ideas how I should proceed with debugging this issue ?

> tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o
> symTbl.c
> invalid command name "::tcl::tm::UnknownHandler"
>     while executing
> "::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4"
....

First sort out whether the problem is in your Tcl install or in
your program.  Start tclsh with an interactive prompt and type
in the same command that is failing, like so:

$ tclsh
% info patch
8.5.8
% ::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4
%

If you see the same failure, we need to debug what's broken in
your Tcl install.  If not we need to debug how your program is
breaking Tcl's autoloader.  Please followup here in either case.

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|
0
Don
1/4/2010 4:14:42 PM
Thanks Dan = Happy New Year !

So I started tclsh executable
The window came up where I typed the following per your instructions

% info patch
8.5.8
% ::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4
%

So per above it appears that the failure reported by the program (it
is actuallty WindRiver Tornado stuff)  did not show up that way -
right ?

But the funny thing that after I performed shown above what you have
suggested in tclsh - the problem I originally reported
in the program which is executed in the MKS (Korn) shell window
disappered as well !
Is there reasonable explanation for that phenomena ?

Thanks,
Alex
0
Alexander
1/4/2010 6:39:26 PM
Alexander R.Povolotsky wrote:
> Thanks Dan = Happy New Year !
> 
> So I started tclsh executable
> The window came up where I typed the following per your instructions
> 
> % info patch
> 8.5.8
> % ::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4
> %
> 
> So per above it appears that the failure reported by the program (it
> is actuallty WindRiver Tornado stuff)  did not show up that way -
> right ?
> 
> But the funny thing that after I performed shown above what you have
> suggested in tclsh - the problem I originally reported
> in the program which is executed in the MKS (Korn) shell window
> disappered as well !
> Is there reasonable explanation for that phenomena ?

The explanation that comes to mind is that you have not actually been
doing what you believed you were doing, or reported that you were doing.
As evidence, I notice that your interactive test is with release 8.5.8
of Tcl, but your original subject claimed troubles with 8.5.7.

I don't know exactly where reality and your reports diverge, but the
explanation must be in there somewhere.

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|
0
Don
1/4/2010 6:45:36 PM
Sorry for the confusion in my previous post.
I forgot that I commented out the line (as a temp solution) just to
get going
#puts $makeSymTbl::fdOut " *         ON [clock format [clock
seconds]]"
so when I uncommented it the problem reappeared again

tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o
symTbl.c
invalid command name "::tcl::tm::UnknownHandler"
    while executing
"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4"
    ("package unknown" script)
    invoked from within
"package require msgcat 1.4"
    ("uplevel" body line 2)
    invoked from within
"uplevel \#0 {
    package require msgcat 1.4
    if { $::tcl_platform(platform) eq {windows} } {
        if { [catch { package require registry 1.1 }] } {
         ..."
    (file "C:/Tornado/host/x86-win32/lib/tcl8.5/clock.tcl" line 23)
    invoked from within
"source -encoding utf-8 [file join $TclLibDir clock.tcl]"
    (procedure "::tcl::clock::format" line 3)
    invoked from within
"clock format [clock seconds]"
    invoked from within
"puts $makeSymTbl::fdOut " *         ON [clock format [clock
seconds]]""
    (file "c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl" line
334)
make: *** [vxWorks.st] Error 1

0
Alexander
1/4/2010 6:50:51 PM
Alexander R.Povolotsky wrote:
> tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o
> symTbl.c
> invalid command name "::tcl::tm::UnknownHandler"
>     while executing
> "::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4"
....
> "puts $makeSymTbl::fdOut " *         ON [clock format [clock
> seconds]]""
>     (file "c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl" line
> 334)

Ok, so something in makeSymTbl.tcl (or something else it brings to the
party) is breaking Tcl's mechanisms for creating the missing command.

To pare down the causes, replace the failing command ("puts $make....")
with a debugging command:

    puts stdout [array get ::auto_index *ownHand*]

This assumes that 'stdout' is something you can see, so you get the
debug information.  Revise as needed if that is not true.

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|
0
Don
1/4/2010 7:13:06 PM
Still can not make

puts stdout [array get ::auto_index *ownHand*]

to work ...

It is not stdout which is not working since

puts stdout "Hello"

works OK

but rather the auto_index itself

My coworker on his PC also did not have
puts stdout [array get ::auto_index *ownHand*]
working but he got some output when he modified above to
puts stdout [array get ::auto_index *]
but for me (on my PC)  this modification didn't produce the output


0
Alexander
1/6/2010 3:48:11 PM
Alexander R.Povolotsky wrote:
> puts stdout [array get ::auto_index *]
> but for me (on my PC)  this modification didn't produce the output

Change to:

puts stdout [array size ::auto_index]

and report whatever you see.

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|
0
Don
1/6/2010 4:03:07 PM
while inserted into
makeSymTbl.tcl,
which is executed within my application

puts stdout [array size ::auto_index]

gives 0 in its output

In contrast if I open tclsh window and do this line there - then I get
79

% puts stdout [array size ::auto_index]
79

On Jan 6, 11:03=A0am, Don Porter <d...@nist.gov> wrote:
> Alexander R.Povolotsky wrote:
> > puts stdout [array get ::auto_index *]
> > but for me (on my PC) =A0this modification didn't produce the output
>
> Change to:
>
> puts stdout [array size ::auto_index]
>
> and report whatever you see.
>
> --
> | Don Porter =A0 =A0 =A0 =A0 =A0Mathematical and Computational Sciences D=
ivision |
> | donald.por...@nist.gov =A0 =A0 =A0 =A0 =A0 =A0 Information Technology L=
aboratory |
> |http://math.nist.gov/~DPorter/=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0NIST |
> |______________________________________________________________________|

0
Alexander
1/6/2010 4:37:48 PM
Alexander R.Povolotsky wrote:
> while inserted into
> makeSymTbl.tcl,
> which is executed within my application
> 
> puts stdout [array size ::auto_index]
> 
> gives 0 in its output

Does the file makeSymTbl.tcl provide its own definition of
the [unknown] command, replacing the one from Tcl's script library?

-- 
| Don Porter          Mathematical and Computational Sciences Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|
0
Don
1/6/2010 4:50:18 PM
>Does the file makeSymTbl.tcl provide its own definition of
>the [unknown] command, replacing the one from Tcl's script library?
It appears to me that this particular one doesn't.
I wish that someone (with Tcl background) from WindRiver would
interject into this discussion and shed some light on what WindRiver
did and did'nt in those tcl scripts
0
Alexander
1/6/2010 7:29:25 PM
>Does the file makeSymTbl.tcl provide its own definition of
>the [unknown] command, replacing the one from Tcl's script library?

I tried to answer above question using the "set auto_index" command
executing it first in the tclsh script and then out of those WindRiver
tcl scripts and to compare the results with regards what source is
referenced ... but I am not having luck with it in both tclsh script
and am getting similar (but not exactly the same)  failure in
executing it out of those WindRiver tcl scripts

% set auto_index(unknown)
can't read "auto_index(unknown)": no such element in array

% set auto_index([unknown])
ambiguous command name "": after append apply array auto_execok
auto_import auto_load auto_load_index auto_qualify binary break case
catch cd chan clock close concat
xit expr fblocked fconfigure fcopy file fileevent flush for foreach
format gets glob global history if incr info interp join lappend
lassign lindex linsert list llen
arch lset lsort namespace open package pid pkg_mkIndex proc puts pwd
read regexp regsub rename return scan seek set socket source split
string subst switch tclLog tc
ad_source time trace unknown unload unset update uplevel upvar
variable vwait while

The difference between what I am getting out of tclsh script (see
above )
and out of those WindRiver tcl scripts
is that for latter the error message does not contain list of commands
- I just get - see below

tclsh c:/Tornado/host/resource/hutils/tcl/bsp2prj.tcl PPC604 gnu all
invalid command name ""
    while executing
"unknown"
    invoked from within
"set auto_index([unknown])"
    (file "c:/Tornado/host/resource/hutils/tcl/bsp2prj.tcl" line 66)
make: *** [prj_default] Error 1

What I am doing wrong ?

Thanks !
0
Alexander
1/11/2010 5:18:33 PM
Reply: