Upgrading TCL


Forum: Other Help Topics
Topic: Upgrading TCL
started by: QQleQ

Posted by QQleQ on Dec. 03 2007,17:30
I have searched and tried everything in order to upgrade TCL to 8.4.. i have done everything described here but if i type:

tclsh
and: info patchlevel

it still gives me 8.3.3.

Anything that i missed? What do i need to do exactly to upgrade to TCL 8.4?

My latest try:
Code Sample
root@0[/]# mydsl-wget  tcltk-8.4.uci  uci
Connecting to www.ibiblio.org[152.46.7.80]:80
tcltk-8.4.uci        100% |*********************************************************************************|  1675 KB    00:00 ETA
tcltk-8.4.uci: OK
root@0[/]# mydsl-load tcltk-8.4.uci
tcltk-8.4.uci sucessfully mounted!
root@0[/]# tclsh
% info patchlevel
8.3.3
% exit

Posted by lucky13 on Dec. 03 2007,18:03
Did you install a previous version? Is the previous version in $PATH and the new one not?
Posted by QQleQ on Dec. 03 2007,18:04
Quote (lucky13 @ Dec. 03 2007,13:03)
Did you install a previous version? Is the previous version in $PATH and the new one not?

How do i check that?

root@0[/]# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games:/opt/bin:.

Posted by lucky13 on Dec. 03 2007,18:12
Do:
which tclsh
whereis tclsh
which wish
whereis wish

Posted by QQleQ on Dec. 03 2007,18:17
Code Sample
root@0[root]# which tclsh
/usr/bin/tclsh
root@0[root]# whereis tclsh
which wish
whereis wishtclsh: /bin/tclsh8.3 /usr/bin/tclsh /usr/bin/tclsh8.4 /usr/bin/tclsh8.3 /usr/local/bin/tclsh8.4 /opt/tcltk-8.4/bin/tclsh /opt/tcltk-8.4/bin/tclsh8.4 /usr/share/man/man1/tclsh.1.gz
root@0[root]# which wish
/usr/bin/wish
root@0[root]# whereis wish
wish: /bin/wish8.3 /usr/bin/wish /usr/bin/wish8.4 /opt/tcltk-8.4/bin/wish /opt/tcltk-8.4/bin/wish8.4
root@0[root]#

Posted by QQleQ on Dec. 03 2007,18:19
export PATH="/opt/tcltk-8.4/bin:PATH"

That fixes it temp.. it gives me 8.4 instead of 8.3.3 but it wont go for the processes in my background (like the eggdrop..) i restarted the whole damn thing and it still wont use the 8.4..
When i switch user or reconnect to my SSH .. its back to 8.3.3. again.

Posted by lucky13 on Dec. 03 2007,18:26
There's your problem. When you type your wish/tclsh commands, it's finding the other version. You can either remove, rename, or relink. Or you can enter the 8.4 command (tclsh8.4) since it appears you have a symlink to it (did you do that? I thought UCIs shouldn't make symlinks outside /opt by default).
Posted by lucky13 on Dec. 03 2007,18:27
Quote
export PATH="/opt/tcltk-8.4/bin:PATH"

That's an ugly remedy. Are you running frugal or hard drive or what?

Posted by QQleQ on Dec. 03 2007,18:28
Quote (lucky13 @ Dec. 03 2007,13:26)
There's your problem. When you type your wish/tclsh commands, it's finding the other version. You can either remove, rename, or relink. Or you can enter the 8.4 command (tclsh8.4) since it appears you have a symlink to it (did you do that? I thought UCIs shouldn't make symlinks outside /opt by default).

I really dont know what that all means..
What do i have to type to remove all the 8.3 version TCL links.. and keep the 8.4?

Posted by lucky13 on Dec. 03 2007,18:34
Do the following:
ls -l /usr/bin/tclsh
ls -l /usr/bin/wish

If these show a link back to the 8.3 verisons of each, then just make new links to the 8.4 versions in /opt/tcltk-etc:

1. Remove the old symlinks as root:
rm -f /usr/bin/tclsh /usr/bin/wish

2. Make new sym-links in your $PATH, e.g.:
ln -s /opt/tcltk-8.4/bin/tclsh8.4 /opt/bin/tclsh
ln -s /opt/tcltk-8.4/bin/wish8.4 /opt/bin/wish

Posted by QQleQ on Dec. 03 2007,19:26
Quote (lucky13 @ Dec. 03 2007,13:34)
Do the following:
ls -l /usr/bin/tclsh
ls -l /usr/bin/wish

If these show a link back to the 8.3 verisons of each, then just make new links to the 8.4 versions in /opt/tcltk-etc:

1. Remove the old symlinks as root:
rm -f /usr/bin/tclsh /usr/bin/wish

2. Make new sym-links in your $PATH, e.g.:
ln -s /opt/tcltk-8.4/bin/tclsh8.4 /opt/bin/tclsh
ln -s /opt/tcltk-8.4/bin/wish8.4 /opt/bin/wish

Ok did that all... now it gives me an error:

error while loading shared libraries: libtcl8.4.so: cannot open shared object file: No such file or directory

Posted by mikshaw on Dec. 03 2007,20:51
You're using a uci on a harddrive-installed DSL, correct?

The UCI is built so that you can add libraries to it. Since  UCI is typically read-only, I had to make some unusual changes, as in symlinking the lib directory to a writable directory (/opt/tcltk-libs), and then link the included libriaries from that directory back into the read-only directory. The Tcl/Tk applications should be looking in /opt/tcltk-8.4/lib, which points to /opt/tcltk-libs.
Check to make sure you still have that /opt/tcltk-libs directory.

You would not have these problems if you installed Tcl from source or debian package, which are more appropriate for a traditional debian-style DSL install. MyDSL packages of any kind are not really intended for use on a harddrive install, even though many of them will work. You will probably continue to have occasional problems like these, though, if you continue using myDSL.

Posted by curaga on Dec. 04 2007,16:30
.dsl and .tar.gz packages work fine on hard drive installs too..
Posted by mikshaw on Dec. 04 2007,19:35
Yes, they usually do, but they are not *intended* for HD installs and therefore are not designed to cope with things such as upgrading existing applications. As this thread demonstrates, if you already have an application installed in /usr, that particular application cannot be upgraded with a uci or tar.gz mydsl package. Even a dsl package might not work, depending on how it was built. If the original application was in /usr/local and the dsl package installs into /usr, the original program will still be the default. Unless the user understands, at least to a point, how the linux filesystem works and how/where the mydsl package installs, that user will continue to run into issues like this. On the other hand, if a user of a traditional HD install goes with Debian packages (apt, synaptic, dpkg) all applications will install into /usr and these opt-isn't-in-path issues will not exist.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.