trouble getting tclapp to find tbcload

Posted by reallyarewolf on 2014-05-29 15:00

Greetings:

I am having trouble getting tclapp to successfully generate a kit/pack for my application. It works when I don't try to compile into .tbc and it fails when i do click on compile .tcl files. I think tclapp cannot find tbcload. When I run Wrap i get an error that package "tbcload --is redirect" is not known. I have tried searching on web and locally on this forum for post about similar problems but found nothing that
really addresses the issue. The base that seems to give the best results (the one that works when I
don't try to compile) is base-tk8.6. I random walked through all the other bases and none of them work.
The teacup one DOES find tbcload but fails to find msgcat which my application requires. I added /opt/ActiveTcl-8.6/lib to TAP Search paths under preferences. That caused Itcl and itcl (both 4.07b) to be added to the list of packages available under the Packages tab in TclApp under the "Add Packages from list of all packages" icon. Before I added /opt/ActiveTcl-8.6/lib only Tcl 8.5 and tcldebugger_attach 1.4 were available. I tried adding /opt/Active-Tcl8.6 to the TAP Search Paths too and that caused a change in the
trace info for the wrap (I think. 2nd time I tried it didn't. I'm getting confused about what I've tried
and not tried) but the package 'tbcload -- is redirect" error still occurred but there were a couple of
new errors about some tbc-ish .c and .h files. I do not have any other versions of Tcl or TclDevKit and TCL_LIBRARY shell is not set. Where is the log file for the tclapp run normally kept? I can't find it or a description of it's normal location or somewhere to set that in the GUI for tclapp (I see where you can
set that for a command line tclapp). Thanks ahead of time for some help!

R

reallyarewolf | Fri, 2014-05-30 00:23

I spent more time reading on the tcl wiki and tcl exchange about related information. I tried putting
in package require tbcload. I used "teacup create" a repository in my home directory. I used "teacup link make" to link to /opt/Active-Tcl8.6/bin/tclsh. I repeatedly scanned for required packages under Packages tab in tclapp (tbcload is now there). Still either can't load tbcload or can't load msgcat while compiling .tcl files.

reallyarewolf | Fri, 2014-05-30 01:04

Still slugging. I tried "teacup update". Seems you have to do that as root (although my understanding
was that the teapot packages is was downloading were going into the repository I just created with "teacup
setup" in my home directory). I tried shifting back to non-compiled and found that was now failing. The
problem was that i had that "package require tbcload" still in my test script. Taking that out got me back
to a working application. I tried "teacup describe tbcload". Apparently I now have 4 of those, different
rev levels. I tried "teacup describe msgcat". And just maybe hit the jackpot with that. The description says: "The msgcat commands of Tcl 8.5 backported for use in 8.4." So...no msgcat for 8.6? I find I am now interested in a setup with 8.6 and 8.5 coexisting. I assume erasing ActiveTcl8.6 and putting in 8.5 will cause TclDevKit to have a fit(?). A little Tcl detente is in order? My guess is there is or will be additional people who run into this same situation and these posts will be of use to them.

reallyarewolf | Fri, 2014-06-13 08:36

This problem is easy to reproduce. Do the following to do so:

I use tclapp& to start the tclapp GUI. I'm not using the command line tclapp.

The prefix I use is:/opt/ActiveTcl-8.6/bin/base-tk8.6-thread-linux-x86_64

I click ON "Compile .tcl files" under the Basic tab.

I add the file "this_error.tcl" under the Files tab. I set it to be main.

The following is this_error.tcl:

#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"
package require msgcat
package require Tk
namespace import msgcat::mc
msgcat::mclocale en_US
msgcat::mcload [file join [file dirname [info script]] msgs]

proc setup {} {
}

setup

Then I try to wrap.

It tells me "package tbcload -is redirect' is not known (Specified, not
recoverable)"

The generated command line is:

"/opt/TclDevKit-5.3/bin/tclapp/entry.tcl -compile prefix
/opt/ActiveTcl-8.6/bin/base-tk8.6-thread-linux-x86_64 -compilefor 8.6 -out
/home/rwolf/out -architecture linux-glibc2.3-x86_64
/home/rwolf/wec_web/this_error.tcl -startup lib/application/this_error.tcl"

I don't see how an extra tbcload can be occurring unless the "..require Tk" and/or
"..require msgcat" causes that to happen. Tk and/or msgcat have "package require tbcload"
in'em?

Reiterating info from my previous posts: When I try to use tea the error I get is that it
can't find msgcat.

R