"Linux Gazette...making Linux just a little less scary! "


My Experience Installing TCL/TK
from 7.4 to 7.5

on Red Hat Linux 2.1, kernel release 1.2.13

By Earl Brown,


In which I chronicle my experiences attempting to upgrade my version of TCL/TK to match the web-based help files I had already obtained.

For the short version, click here

On with the story!

Naturally, the first thing I looked for was the RPM. Found it, couldn't get it because Red Hat FTP was _slow_ during daytime. So I went to sun.

There I found tcl7.5 (I'm cautious - don't want to use beta stuff when I can avoid it. That is until I'm independently wealthy with time on my hands!). Look for:

    ftp://ftp.sunlabs.com/pub/tcl/tcl7.5p1.tar.gz
That's the file I got. Download it. While you're there, get:
    tk4.1p1.tar.gz
I created a directory off my home:
    ~/tcl
and put both files in there. From there I unzipped them to get two subdirectories:

    ~/tcl/tcl7.5
    ~/tcl/tk4.1
Both of these contain a README file - I read it (but only closely enough to see that there was a README in the 'unix' subdirectory that would give me info on how to compile.

So, I changed to the unix subdirectory:

    ~/tcl/tcl7.5/unix
And read the README file. It said run "configure" (which just checked out my machine), and then run "make" (which does about what you'd expect), then run "make install". All of these appeared to work, but when I ran 'wish', I still had the old versions. Hmmmm. Damn.

Put it on the back burner for a while - I've other work to do. When I got home, I looked up the files again (and found the RPM this time), and downloaded them (at 28.8, instead of T-1 :(


Next morning...

First thing is try the RPM. No luck - it said the .rpm was a 'version 3' RPM, and that I needed to upgrade my version of RPM. Okay - glad I've got two machines at home (Thank you, Mom, for giving me your old '486!), I started up the Windows box (I'm looking forward to getting WABI so my wife can play FreeCell in a _real_ OS :) and started surfing again...

Does anybody know why the rpm says that rpm2.2.rpm is a version 3 rpm and I need to upgrade?

While I was finding this out, I was exploring other avenues. I got the files from sun installed on my machine at home. But they wouldn't compile (something about missing include files - this didn't surprise me, I've stripped that machine back in the name of hard drive space).

So, being the explorer I am, I got out the 'sun archives' CD from my Red Hat install set. Did a 'find' for "*.tcl" and was happy to see there was a tcl7.5p1.tar.gz file. Good. Ungzipped the thing and 'tar tvf'ed it to see what was in it. Hmmm. "./usr/..." Looks like I should just untar it from the root directory. I'm not so cautious when I'm frustrated.

This option took a _lot_ of drive space. I wish I could undo it. It didn't really work (and it complained about not being able to form links. I tried to do the links myself, but it still failed).


Nap time...

That was relaxing. I realized I'd been able to compile at the office, where it was all the same setup, so I could play with "make install" at home and see what I could do.

While I was connected to work, I had the idea to try "wish" from the compiled directory at work. IT WORKED! Headway at last! (Did I also mention that I'm sometimes a bit slow?) But I've got this really ugly hierarchy of files to my compiled copy of 'wish', and I don't know what it's going to look for. Copy to my home machine.

Here's the part where things go quickly.

On the home machine, I set up the directory structure I had at work and untarred the files. Now I've got a working copy of wish and tclsh.

I created a 'bin' directory off my home directory and copied 'wish' and 'tclsh' into that directory. I also copied the two 'lib' files "libtcl7.5.a" and "libtk4.1.a" into the bin directory. I don't know where they really go, but this place makes good sense.

So I run 'wish' from there. Error message - unable to load 'libtcl' from a list of directories. I'm not sure what they all were, but one was '~/library'. Since it worked from ~/tcl/tk4.1/unix, I just copied the '~/tcl/tk4.1/library' directory to '~/library', and then copied '~/tcl/tcl7.5/library' to '~/library'.

Now wish ran with the right version. Delete the ~/tcl structure (backup just in case!) and it worked. Good enough. I played with my working install of tcl/tk quite happily the rest of the day.


But during the night...

"I've got to set it up to work better!"

So, I get to work and get 'wish' to give me an error message - it complained that the 'init.tcl' was not found in '/usr/local/lib/tcl7.5'.

Okay. I went to '~/tcl/tcl7.5/library' and copied the files I found there to '/usr/local/lib/tcl7.5' (a directory which I had to create, by the way).

Run 'wish' again, and this time it complains about 'tk.tcl' not being found in '/usr/local/lib/tk4.1'. I'd expected something like that. So, create '/usr/local/lib/tk4.1' and 'cp ~/tcl/tk4.1/library/* /usr/local/lib/tk4.1'. And it worked!

Then 'cp ~/tcl/tcl7.5/unix/tclsh /usr/bin/tclsh7.5' and 'cp ~/tcl/tl4.1/unix/wish /usr/bin/wish4.1'. Go to ~ and run 'wish4.1'. It worked again! Good, create the link 'ln -sf /usr/bin/wish4.1 /usr/bin/wish' and 'ln -sf /usr/bin/tclsh7.5 /usr/bin/tclsh'

Try it again; 'wish' - and success!

Things I found out:


Short Summary:

Get ftp://ftp.sunlabs.com/pub/tcl/tcl7.5p1.tar.gz and tk4.1p1.tar.gz
'gunzip' them and 'tar xvf' them

'cd ./tcl7.5/unix'
'configure'
'make'
'make install'
'cd  ../..'
'cd ./tk4.1/unix'
'configure'
'make'
'make install'

cd ../..
'cp ./tk4.1/unix/wish /usr/bin/wish4.1'
'cp ./tcl7.5/unix/tclsh /usr/bin/tclsh7.5'
'ln -sf /usr/bin/wish4.1 /usr/bin/wish'
'ln -sf /usr/bin/tclsh7.5 /usr/bin/tclsh'
'mkdir /usr/local/lib/tcl7.5'
'mkdir /usr/local/lib/tk4.1'
'cp ./tcl7.5/library/* /usr/local/lib/tcl7.5'
'cp ./tk4.1/library/* /usr/local/lib/tk4.1'

At this point, I'm pretty sure 'wish' will work. But no guarantees.

And there will also be a bunch of files left over from any previous installation of TCL/TK. Maybe someday I'll clean them up. Probably not till I get the new Red Hat 4, tho...(I've got to remember to tar & gzip my 'home' tree before that install!)

Earl


Copyright © 1996, by Earl Brown
Published in Issue 11 of the Linux Gazette


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next