This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tcl_Init failed: can't read "env(TCL_LIBRARY)": no such variable


Lai Xuecheng wrote:

- Can you run it from your build directory?
A: you mean ./insight under the build directory? There
is no such file.

Should be $BUILD_DIR/gdb/insight. There is code to deal with the special case of running from the build directory.


- TCL_LIBRARY is actually defined in and used by the
Tcl libraries. Can  you run just the tcl shell that
was installed by your insight installation?
A: when I run tcl, "tcl>" is able to appear.

Hmm. That's odd. So tclsh8.4 runs just fine, but insight will not.


BTW, the same problem exists for my installation of
insight 6.4.

Something odd going on. I'm not sure what though. If you set a break at gdbtk.c:482, is that breakpoint ever hit? If so, you might try printing the tcl variable ::errorInfo at this point (before calling error()).


It occurs to me that this startup script could be failing (see top of gdbtk_init):

---- from gdbtk.c ----
static char set_libs_path_script[] = "\
set srcDir [file dirname [file dirname $env(TCL_LIBRARY)]];\n\
\
if {![info exists env(TK_LIBRARY)]} {\n\
set env(TK_LIBRARY) [file join $srcDir tk library]\n\
}\n\
\
if {![info exists env(ITCL_LIBRARY)]} {\n\
set env(ITCL_LIBRARY) [file join $srcDir itcl itcl library]\n\
}\n\
\
if {![info exists env(ITK_LIBRARY)]} {\n\
set env(ITK_LIBRARY) [file join $srcDir itcl itk library]\n\
}\n\
\
if {![info exists env(IWIDGETS_LIBRARY)]} {\n\
set env(IWIDGETS_LIBRARY)\
[file join $srcDir itcl iwidgets generic]\n\
}\n\
\
if {![info exists env(GDBTK_LIBRARY)]} {\n\
set env(GDBTK_LIBRARY) [file join $srcDir gdb gdbtk library]\n\
}\n\
\
# Append the directory with the itcl pkg index\n\
if {[info exists env(TCLLIBPATH)]} {\n\
append env(TCLLIBPATH) :[file joing $srcDir itcl]\n\
} else {\n\
set env(TCLLIBPATH) [file join $srcDir itcl]\n\
}\n\
\
# We also need to append the iwidgets library path.\n\
# Unfortunately, there is no IWIDGETS_LIBRARY.\n\
set IWIDGETS_LIBRARY [file join $srcDir itcl iwidgets generic]\n";


---- end ----

I wonder if the very first line of this is causing you problems. If you set TCL_LIBRARY to /usr/local/share/tcl8.4, does the problem go away?

Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]