I am an utter novice with Tcl. I have an application that I am
building that makes extensive use of Tcl. I have built this
application once before on OS X without Tcl problems. I am now trying
to build it on linux-x86_64. I have built and installed the
application but when I try to launch it I get the error:
unknown namespace in import pattern "itcl::*"
while executing
"namespace import itcl::*"
(file "/usr/local/staden-src-1-7-0/linux-x86_64-bin/../tables/
iwidgetsrc" line 13)
...and the stack of calls unwinds...
Looking around Google and this list it appears this problem is related
to the failure to find pkgIndex.tcl. Looking at the make file for
iwidgets4.0.1 it looks like the files got put where the make file
wanted them to go but I don't know that it is correct for this
particular linux. There are several different apps using Tcl and each
has a (slightly different) pkgIndex.tcl file. I have not been able to
find in the docs or the book I bought the rules for where the
pkgIndex.tcl should go. Can someone advise me where Tcl looks for the
pkgIndex files or suggest another source of the namespace problem?
Thanks
Mike
To check where your Tcl install is looking for pkgIndex.tcl files,
start up an interactive Tcl and type "puts $auto_path". That'll show a
list of directories that are checked.
Also, make sure you have a 'package require Itcl' (or is it itcl? I
can never remember how they capitalize the package name) before the
"namespace import". If it is there, it should be raising an error if
the package can't be found - perhaps you have it in a [catch] or
something like that? If so, you probably want to either remove the
catch (so it throws an error when it fails to load Itcl), or put the
namespace import inside a catch, too (if Itcl is optional for your
app).
MG