Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2006-03-04
10:41 • Closed ticket [1442620fff]: fails to work correctly on solaris8 plus 4 other... artifact: 5072fdd90c user: dgp
08:31 • Ticket [1442620fff]: 4 changes artifact: 53cb27fd3a user: acb
05:25 • Ticket [1442620fff]: 4 changes artifact: d7edcc25a9 user: dgp
05:03 • Ticket [1442620fff]: 4 changes artifact: 1b5f6cbdfd user: acb
04:57 • Ticket [1442620fff]: 4 changes artifact: c4356d434a user: dgp
03:29 • Ticket [1442620fff]: 4 changes artifact: aac03eb2dc user: acb
03:21 • Ticket [1442620fff]: 4 changes artifact: 6b569b2d66 user: dgp
02:59 • Ticket [1442620fff]: 4 changes artifact: 77e9cd9cf6 user: acb
02:51 • Ticket [1442620fff]: 4 changes artifact: 4fed26b5a2 user: dgp
02:45 • Ticket [1442620fff]: 4 changes artifact: 8a90bef415 user: acb
02:28 • Ticket [1442620fff]: 4 changes artifact: bf5e3e7030 user: dgp
02:23 • Ticket [1442620fff]: 6 changes artifact: a2958c1624 user: dgp
2006-03-03
17:57 • New ticket [1442620fff]. artifact: 78addb483b user: acb

fails to work correctly on solaris8

Closed / Invalid1442620fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2006-03-03 17:57:06
OS Platform and version:
sparc solaris 8

Problem Behavior:
invocations fails with:
application-specific initialization failed: Can't find
a usable init.tcl in the following directories: 
    /palab/apps/tcl/lib/tcl8.4 /palab/fa/lib/tcl8.4
/palab/apps/tcl/lib/tcl8.4 /palab/apps/tcltk/lib/tcl8.4
/palab/apps/lib/tcl8.4 /palab/apps/tcltk/library
/palab/apps/library /palab/apps/tcl8.4.11/library
/palab/tcl8.4.11/library /palab/fa/lib/tcl8.4

/palab/apps/tcltk/lib/tcl8.4/init.tcl: can't read
"::auto_path": no such variable
can't read "::auto_path": no such variable
    while executing
"lsearch -exact $::auto_path $Dir"
    ("foreach" body line 2)
    invoked from within
"foreach Dir [list [info library] [file dirname [info
library]]] {
            if {[lsearch -exact $::auto_path $Dir] < 0} {
                lappend ::auto_path $Dir
            }..."
    (in namespace eval "::tcl" script line 4)
    invoked from within
"namespace eval tcl {
    variable Dir
    if {[info library] ne ""} {
        foreach Dir [list [info library] [file dirname
[info library]]] {
            if {[lse..."
    (file "/palab/apps/tcltk/lib/tcl8.4/init.tcl" line 49)
    invoked from within
"source /palab/apps/tcltk/lib/tcl8.4/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"


This probably means that Tcl wasn't installed properly.


Expected Behavior:
installed binary works without errors.

was built by
tar xfvz tcl8.4.12-src.tar.gz && cd tcl8.4.12/unix &&
./configure --prefix=/palab/apps/tcltk && make && make
install

There are no errors thru make or make install, but make
test fails with similar errors.
dgpplain2006-03-04 02:23:43
Logged In: YES 
user_id=80530


Very weird.  looking...
dgpplain2006-03-04 02:28:17
Logged In: YES 
user_id=80530


The error appears to come
from line 53 of the file
/palab/apps/tcltk/lib/tcl8.4/init.tcl

but I don't see how you
can pass through lines 42-48
without getting ::auto_path
defined.

Can you debug that, and report?
acbplain2006-03-04 02:45:16
Logged In: YES 
user_id=14072

It appears that the expression on line 42

   if {![info exists auto_path]} {

evaluates to 0. Inserting the lines:

set tmpvar [info exists auto_path]
puts stderr "VALUE is: $tmpvar"

just before line 42 results in this output:
--------------------
$ /palab/apps/tcltk/bin/tclsh8.4 
VALUE is: 0
application-specific initialization failed: Can't find a
usable init.tcl in the following directories: 
    /palab/fa/lib/tcl8.4 /palab/apps/tcltk/lib/tcl8.4
/palab/apps/lib/tcl8.4 /palab/apps/tcltk/library
/palab/apps/library /palab/apps/tcl8.4.11/library
/palab/tcl8.4.11/library /palab/fa/lib/tcl8.4

/palab/apps/tcltk/lib/tcl8.4/init.tcl: can't read
"::auto_path": no such variable
can't read "::auto_path": no such variable
    while executing
"lsearch -exact $::auto_path $Dir"
    ("foreach" body line 2)
    invoked from within
"foreach Dir [list [info library] [file dirname [info
library]]] {
            if {[lsearch -exact $::auto_path $Dir] < 0} {
                lappend ::auto_path $Dir
            }..."
    (in namespace eval "::tcl" script line 4)
    invoked from within
"namespace eval tcl {
    variable Dir
    if {[info library] ne ""} {
        foreach Dir [list [info library] [file dirname [info
library]]] {
            if {[lse..."
    (file "/palab/apps/tcltk/lib/tcl8.4/init.tcl" line 51)
    invoked from within
"source /palab/apps/tcltk/lib/tcl8.4/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"


This probably means that Tcl wasn't installed properly.
--------------------
dgpplain2006-03-04 02:51:13
Logged In: YES 
user_id=80530


OK, I see something weird in your
report.  You claim to be building
and testing Tcl 8.4.12 sources, but
the error message reports that it
is searching in paths like

/palab/apps/tcl8.4.11/library

It would only search in a path like
that if the "libtcl" active in your
program is that of version 8.4.11.

It is possible (though I don't yet
know how) that 8.4.11 libtcl might
be incompatible with 8.4.12 init.tcl.

That is, the error message appears
to be correct when it says
"This probably means that Tcl wasn't installed properly."

It appears that you are installing
the 8.4.12 version of libtcl as
/palab/apps/tcltk/lib/libtcl8.4.so ?
Is the runtime loader able to find
that library when you run Tcl apps?

When I run `make test` for Tcl 8.4.12,
the first several lines of output are:

LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
LD_LIBRARY_PATH; \
TCL_LIBRARY="/local/src/tcl8.4.12/library"; export
TCL_LIBRARY; \
./tcltest /local/src/tcl8.4.12/unix/../tests/all.tcl  

What lines do you see?
acbplain2006-03-04 02:59:16
Logged In: YES 
user_id=14072

Here's the output I get from make test:

$ cd /home/a7056/.code/tcl8.4.12/unix && make test
LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
LD_LIBRARY_PATH; \
TCL_LIBRARY="/home/a7056/.code/tcl8.4.12/library"; export
TCL_LIBRARY; \
./tcltest /home/a7056/.code/tcl8.4.12/unix/../tests/all.tcl  
application-specific initialization failed: Can't find a
usable init.tcl in the following directories: 
    /home/a7056/.code/tcl8.4.12/library
/palab/apps/tcltk/lib/tcl8.4
/home/a7056/.code/tcl8.4.12/library
/home/a7056/.code/tcl8.4.12/tcl8.4
/home/a7056/.code/tcl8.4.12/lib/tcl8.4
/home/a7056/.code/lib/tcl8.4
/home/a7056/.code/tcl8.4.12/library
/home/a7056/.code/library
/home/a7056/.code/tcl8.4.12/library
/home/a7056/tcl8.4.12/library /palab/apps/tcltk/lib/tcl8.4

/home/a7056/.code/tcl8.4.12/library/init.tcl: can't read
"::auto_path": no such variable
can't read "::auto_path": no such variable
    while executing
"lsearch -exact $::auto_path $Dir"
    ("foreach" body line 2)
    invoked from within
"foreach Dir [list [info library] [file dirname [info
library]]] {
            if {[lsearch -exact $::auto_path $Dir] < 0} {
                lappend ::auto_path $Dir
            }..."
    (in namespace eval "::tcl" script line 4)
    invoked from within
"namespace eval tcl {
    variable Dir
    if {[info library] ne ""} {
        foreach Dir [list [info library] [file dirname [info
library]]] {
            if {[lse..."
    (file "/home/a7056/.code/tcl8.4.12/library/init.tcl"
line 49)
    invoked from within
"source /home/a7056/.code/tcl8.4.12/library/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"
/palab/apps/tcltk/lib/tcl8.4/init.tcl: 

/home/a7056/.code/tcl8.4.12/library/init.tcl: 

/home/a7056/.code/tcl8.4.12/library/init.tcl: 

/home/a7056/.code/tcl8.4.12/library/init.tcl: 

/palab/apps/tcltk/lib/tcl8.4/init.tcl: 


This probably means that Tcl wasn't installed properly.

invalid command name "tclPkgUnknown"
    while executing
"tclPkgUnknown tcltest {}"
    ("package unknown" script)
    invoked from within
"package require tcltest"
    invoked from within
"set tcltestVersion [package require tcltest]"
    (file
"/home/a7056/.code/tcl8.4.12/unix/../tests/all.tcl" line 15)
make: *** [test] Error 1

I had previously tried to install tcl8.4.11 on the system
with similar results, but never took the time to report the
bug...
dgpplain2006-03-04 03:21:38
Logged In: YES 
user_id=80530


Thanks for the testing.  The `make test`
gives more useful info, so let's stick
with that.

At the beginning of file
/home/a7056/.code/tcl8.4.12/library/init.tcl
please add a line:

  puts "current namespace is [namespace current]"

and report the new output from`make test`
acbplain2006-03-04 03:29:37
Logged In: YES 
user_id=14072

just noticed that replacing line 42 of
/palab/apps/tcltk/lib/tcl8.4/init.tcl with 

if {[info exists auto_path]==0} {

gets rid of the complaints about auto_path, but it still
says it can't find a usable init.tcl:

$/palab/apps/tcltk/bin/tclsh8.4 
application-specific initialization failed: Can't find a
usable init.tcl in the following directories: 
    /palab/apps/tcltk/lib/tcl8.4
/palab/apps/tcltk/lib/tcl8.4 /palab/apps/lib/tcl8.4
/palab/apps/tcltk/library /palab/apps/library
/palab/apps/tcl8.4.12/library /palab/tcl8.4.12/library
/palab/apps/tcltk/lib/tcl8.4

/palab/apps/tcltk/lib/tcl8.4/init.tcl: 

/palab/apps/tcltk/lib/tcl8.4/init.tcl: 

/palab/apps/tcltk/lib/tcl8.4/init.tcl: 



This probably means that Tcl wasn't installed properly.






Here's the output of make test with after your suggested change:
$ make test
LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
LD_LIBRARY_PATH; \
TCL_LIBRARY="/home/a7056/.code/tcl8.4.12/library"; export
TCL_LIBRARY; \
./tcltest /home/a7056/.code/tcl8.4.12/unix/../tests/all.tcl  
current namespace is ::
current namespace is ::
current namespace is ::
current namespace is ::
application-specific initialization failed: Can't find a
usable init.tcl in the 
following directories: 
    /home/a7056/.code/tcl8.4.12/library
/palab/apps/tcltk/lib/tcl8.4 /home/a7056
/.code/tcl8.4.12/library /home/a7056/.code/tcl8.4.12/tcl8.4
/home/a7056/.code/tc
l8.4.12/lib/tcl8.4 /home/a7056/.code/lib/tcl8.4
/home/a7056/.code/tcl8.4.12/libr
ary /home/a7056/.code/library
/home/a7056/.code/tcl8.4.12/library /home/a7056/tc
l8.4.12/library /palab/apps/tcltk/lib/tcl8.4

/home/a7056/.code/tcl8.4.12/library/init.tcl: can't read
"::auto_path": no such 
variable
can't read "::auto_path": no such variable
    while executing
"lsearch -exact $::auto_path $Dir"
    ("foreach" body line 2)
    invoked from within
"foreach Dir [list [info library] [file dirname [info
library]]] {
        if {[lsearch -exact $::auto_path $Dir] < 0} {
        lappend ::auto_path $Dir
        }..."
    (in namespace eval "::tcl" script line 4)
    invoked from within
"namespace eval tcl {
    variable Dir
    if {[info library] ne ""} {
    foreach Dir [list [info library] [file dirname [info
library]]] {
        if {[lse..."
    (file "/home/a7056/.code/tcl8.4.12/library/init.tcl"
line 50)
    invoked from within
"source /home/a7056/.code/tcl8.4.12/library/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"
/palab/apps/tcltk/lib/tcl8.4/init.tcl: 

/home/a7056/.code/tcl8.4.12/library/init.tcl: 

/home/a7056/.code/tcl8.4.12/library/init.tcl: 

/home/a7056/.code/tcl8.4.12/library/init.tcl: 

/palab/apps/tcltk/lib/tcl8.4/init.tcl: 

This probably means that Tcl wasn't installed properly.
invalid command name "tclPkgUnknown"
    while executing
"tclPkgUnknown tcltest {}"
    ("package unknown" script)
    invoked from within
"package require tcltest"
    invoked from within
"set tcltestVersion [package require tcltest]"
    (file
"/home/a7056/.code/tcl8.4.12/unix/../tests/all.tcl" line 15)
make: *** [test] Error 1



Thanks for the quick debugging work!
dgpplain2006-03-04 04:57:07
Logged In: YES 
user_id=80530


ok, something is deeply, deeply
wrong here, and we need to figure
it out, and only you seem to
reproduce it.

thanks for helping with the
debugging, but please let's
stay on one track at a time.

Please change the "auto_path"
variables on lines 42, 44, 46
to "::auto_path" and report
the results of `make test`.
acbplain2006-03-04 05:03:07
Logged In: YES 
user_id=14072

after this change, the result of make test is identical to
what it was before:

$ make test
LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export
LD_LIBRARY_PATH; \
TCL_LIBRARY="/home/a7056/.code/tcl8.4.12/library"; export
TCL_LIBRARY; \
./tcltest /home/a7056/.code/tcl8.4.12/unix/../tests/all.tcl
current namespace is ::
current namespace is ::
current namespace is ::
current namespace is ::
application-specific initialization failed: Can't find a
usable init.tcl in the following directories:
    /home/a7056/.code/tcl8.4.12/library
/palab/apps/tcltk/lib/tcl8.4
/home/a7056/.code/tcl8.4.12/library
/home/a7056/.code/tcl8.4.12/tcl8.4
/home/a7056/.code/tcl8.4.12/lib/tcl8.4
/home/a7056/.code/lib/tcl8.4
/home/a7056/.code/tcl8.4.12/library
/home/a7056/.code/library
/home/a7056/.code/tcl8.4.12/library
/home/a7056/tcl8.4.12/library /palab/apps/tcltk/lib/tcl8.4

/home/a7056/.code/tcl8.4.12/library/init.tcl: can't read
"::auto_path": no such variable
can't read "::auto_path": no such variable
    while executing
"lsearch -exact $::auto_path $Dir"
    ("foreach" body line 2)
    invoked from within
"foreach Dir [list [info library] [file dirname [info
library]]] {
        if {[lsearch -exact $::auto_path $Dir] < 0} {
        lappend ::auto_path $Dir
        }..."
    (in namespace eval "::tcl" script line 4)
    invoked from within
"namespace eval tcl {
    variable Dir
    if {[info library] ne ""} {
    foreach Dir [list [info library] [file dirname [info
library]]] {
        if {[lse..."
    (file "/home/a7056/.code/tcl8.4.12/library/init.tcl"
line 50)
    invoked from within
"source /home/a7056/.code/tcl8.4.12/library/init.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $tclfile]"
/palab/apps/tcltk/lib/tcl8.4/init.tcl:

/home/a7056/.code/tcl8.4.12/library/init.tcl:

/home/a7056/.code/tcl8.4.12/library/init.tcl:

/home/a7056/.code/tcl8.4.12/library/init.tcl:

/palab/apps/tcltk/lib/tcl8.4/init.tcl:



This probably means that Tcl wasn't installed properly.

invalid command name "tclPkgUnknown"
    while executing
"tclPkgUnknown tcltest {}"
    ("package unknown" script)
    invoked from within
"package require tcltest"
    invoked from within
"set tcltestVersion [package require tcltest]"
    (file
"/home/a7056/.code/tcl8.4.12/unix/../tests/all.tcl" line 15)
make: *** [test] Error 1
dgpplain2006-03-04 05:25:42
Logged In: YES 
user_id=80530

hmmm... ringing a little bit
of a bell now.

What compiler is in use?
acbplain2006-03-04 08:31:37
Logged In: YES 
user_id=14072

compiler that was used was egcs-2.91.66

...looks like that was the problem. I just tried with
gcc3.3.1, and everything seems to install and work correctly
now.

Thanks!
dgp Closed ticket [1442620fff]. [History diff]2006-03-04 10:41:23
Log in (anonymous is fine) to add a comment.