Operating System - OpenVMS
1824169 Members
3535 Online
109668 Solutions
New Discussion юеВ

Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

 
SOLVED
Go to solution
Galen Tackett
Valued Contributor

Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

[The HP staffer who ported tcl/tk for the freeware disk is understandably unable to offer no-charge support so I thought I'd toss this out here...]

I'm trying to get tcl and tk from the Freeware V8.0 distribution installed on my V7.3-2 system. [I should mention that I'm pretty much a novice with tcl/tk but have been running VMS systems for 20-odd years--and some of them were very odd indeed :-]

Following the instructions on the freeware disk in [TCLTK]FREEWARE_README.TXT everything seems to build OK, but when I run wish from my user directory USER:[TACKGAL] it tells me:

Application initialization failed: Can't find a usable init.tcl in the following directories:

Libtcl.exe ./lib/tcl8.0 ./lib/tcl8.0. ./library ./library ./tcl8.0/library ./tcl8.0/library

This probably means that Tcl wasn't installed properly.

And wish exits at that point.

Using the DCL command SET WATCH FILE/CLASS=(MAJOR,DIR) I can see it trying to find USER:[TACKGAL]LIBRARY.DIR;1 but I don't have any such subdirectory. It apparently doesn't try any other directories at all.

So I tried setting my default directory to [TCLTK.TCL8_0_5] which does have a [.LIBRARY] subdirectory and then ran wish. I got the following similar error messages:

Application initialization failed: Can't find a usable init.tcl in the following directories:

Libtk.exe ./lib/tk8.0 ./lib/tkl8.0. ./library ./library ./tk8.0/library ./tk8.0/library

This probably means that Tcl wasn't installed properly.

A small square window appeared. Wish didn't exit but also didn't prompt. Typing Ctrl/C back in the DCL window aborted things normally.

So it looks like tcl and tk may not be following the right path to their library files, but I don't know how to make them look elsewhere.

9 REPLIES 9
Galen Tackett
Valued Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

Oops. The dreaded cut/paste/edit error strikes again!

The second time I ran wish (with default directory [TCLTK.TCL8_0_5] the first line of the error messages said it couldn't find a usable init.tk, not init.tcl as I accidentally made it read.
Andreas Vollmer
Valued Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

Hello Galen,

I don't know the TCL/TK software but the first thing came in my mind is ODS-5.
Due to the fact the UNIX is case sensitve and supports special characters in its dirctory and file names it is partly obvious that an ODS-5 formated disk is required.
Please keep in mind to define the parsing style to extend the DCL parsing and enabling mixed case file and directory names - (SET PROCESS /PARSE_STYLE=EXTENDED)

I hope my input gives you some clues.
Andreas
OpenVMS Forever!
Steven Schweda
Honored Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

Excessive curiosity strikes again. I sucked
down the Freeware kit(s), and hit the same
complaint about "init.tcl". This stuff seems
to be seriously lame.

I changed the TCL "make" file a little:

alp $ diff utility_root:[SOURCE.TCL-TK.TCL8_0_5.VMS]MAKEFILE._ORIG MAKEFILE.
************
File UTILITY_ROOT:[SOURCE.TCL-TK.TCL8_0_5.VMS]MAKEFILE._ORIG;1
108 TCL_LIBRARY="""libtcl.exe"""
109 TCL_PACKAGE_PATH="""./tcl8_0_5"""
******
File UTILITY_ROOT:[SOURCE.TCL-TK.TCL8_0_5.VMS]MAKEFILE.;4
108 ###TCL_LIBRARY="""libtcl.exe"""
109 TCL_LIBRARY = """TCL_LIBRARY"""
110 TCL_PACKAGE_PATH="""./tcl8_0_5"""
************

I claim that "libtcl.exe" makes no sense
here. I then defined an "environment
variable", TCL_LIBRARY, so:

define TCL_LIBRARY utility_root:[SOURCE.TCL-TK.tcl8_0_5.library]

which got me so far as a "no display name and
no $DISPLAY environment variable" complaint.

Invoking the thing with "-display" helped
that:

wish -display 'f$trnlnm( "DECW$DISPLAY")'

The result there was a "Can't find a usable
tk.tcl" complaint, with a similarly useless
list of directories, but without an obviously
defective one corresponding to "libtcl.exe"
in the earlier complaint.

Comments suggest that it should be using
TK_LIBRARY here, but if it's actually doing
that, I missed it in my quick look.

I know it's free, but this stuff is not very
sturdy.
Galen Tackett
Valued Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

Andreas,

ODS-5 does not appear to be a problem here but I do appreciate the tip, as I hadn't thought to check that out.

Steve,

You've hit on the same problems I had turned up over the last few days. I'm fiddling with the build script to see if it's fixable from there, or if I'll have to make some kind of source change--hopefully minor, since it's completely new to me.

I need to look more closely at tclunixinit.c, tkunixinit.c, and other initialization code to see how these two search paths are constructed.

[I was rather disappointed that the individual, "nameless here forevermore," who ported the code to VMS couldn't offer much help, though of course he had no obligation whatsoever to do so.]

(Sorry for the quote from Poe. With Halloween so close I just couldn't resist :-)
Galen Tackett
Valued Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

As they initialize themselves, tcl and tk assume that if the environment variable TCL_LIBRARY (or TK_LIBRARY), that variable's name and value will be present in C's environ array.

Unfortunately this isn't the case with the VMS C rtl, at least not yet. All you get in environ is:

* HOME---Your login directory
* TERM---The type of terminal being used
* PATH---The default device and directory
* USER---The name of the user who initiated the process

I hacked tclenv.c to make it check for xxx_LIBRARY via getenv() instead of looking in the environ array. This got tcl to find the init.tcl and init.tk once I defined xxx_LIBRARY logicals for the appropriate directories.

Then I ran into a much bigger roadblock.

Once it initialized and popped up an empty window (as it should), wish went into its event loop waiting for something to happen. Unfortunately it never seemed to see keyboard or X input events, and it was just stuck until I hit ctrl/y.

I poked around with the debugger and found that tclevent.c is using select() to check for input events. Unfortunately, unlike typical unix socket routines HP TCP/IP's select() only works on sockets, not regular files like stdin, stdout, etc. So select() returns an error, which is ignored, and the event loop repeats (forever).

Fixing this would require more work than I want to do right now. Sigh...
Steven Schweda
Honored Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

All this might lead one to wonder why this
kit was submitted to the Freeware collection.
Galen Tackett
Valued Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

Ya gotta wonder...

It was submitted by an HP employee in France (not that geographical location has anything to do with it.)
Alexey Chupahin
Occasional Advisor
Solution

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

Please try
http://www.openvms.org/stories.php?story=06/12/28/1679862

This is the one of the latest port of tcltk -
beta release.
Now I've prepeared a really latest and it seems, this is a quite stable release 8.4.14 with little OpenVMS restrictions and started VisualTCL, ASED and other large and small applications...

Galen Tackett
Valued Contributor

Re: Installing Tcl/Tk V8.0.5 from OpenVMS V8.0 Freeware

For a while now I haven't had a chance to try Alexey's port of the new version, but it's nice to see that someone else is interested in working on tcl/tk for openvms.