Community Edition TEACUP problems with upgrade of Ubuntu Linux from 10.10 to 11.04

Posted by buchs on 2011-05-07 03:53

I had ActiveTcl8.5.8.1.291945-linux-x86_64-threaded.tar.gz installed on Ubuntu Linux 10.10, 64-bit and all was fine. When I upgraded Ubuntu to 11.04, 64-bit, but left the Active TCL install intact, things stopped working with the package repository. It no longer found the module "sound" when I ran tclsh. It also would not find snack. I used teacup and tried to install that module (teacup install sound) but it said it couldn't find it. Then I tried teacup search sound. That found it. So, next I did a teacup get sound and used the resulting file name on the teacup install command. That installed it. However, tclsh still reported it missing.

I deleted and reinstalled the same version of ActiveTcl. I had the same results. I went through the above procedure with teacup and had all the same results.

Then I downloaded the latest community edition: ActiveTcl8.5.9.2.294317-linux-x86_64-threaded.tar.gz. Now with this version, teacup get sound downloaded some files. When I tried this command teacup install package-sound-2.2-linux-glibc2.3-x86_64.zip, I get this error message:

Unable to install package "sound 2.2" for architecture
"linux-glibc2.3-x86_64". The repository at
"/opt/ActiveTcl-8.5/lib/teapot" accepts only packages for the
architectures linux-unknown-x86_64, and tcl.

I experienced the same results when I tried the package snack. And, teacup install package-name again returns the not found message.

Anyone have any clues on this?

andreas.kupries
ActiveState Staff
Mon, 2011-05-09 08:54

Hi buchs.

The main clue seem to be in "linux-unknown-x86_64".
This is the output of the 'platform::identify' command in the platform package.

My guess is that before the upgrade of Ubuntu the output was something like

linux-glibc2.3-x86_64

This would also be the cause of the other trouble you saw, because this platform code is put into the auto_path, so that tclsh finds the packages for its platform, ignoring packages not matching that.

To test this theory a bit, please run 'tclsh', then do

% package require platform

and

% platform::identify

and tell me the results.

If you run

% package ifneeded platform [package require platform]

you will see where the platform package is installed, and then you can look into its
code. The code dealing out the 'unknown' is in 'platform::identify', around line 177ff

The only I currently see the 'unknown' being kept is that the libc is not found at all. It should be searched in /lib64 I believe, based on the description of your system.

Thus, I would like to know where libc*.so is found on you upgraded system.

buchs | Mon, 2011-05-09 18:41

Andreas,

Thanks for your reply.

Here is what I see:

% platform::identify
linux-unknown-x86_64
% package ifneeded platform [package require platform]
package provide platform 1.0.9;source -encoding utf-8 /usr/share/tcltk/tcl8.5/tcl8/platform-1.0.9.tm

Here are the libc files I found:

  • /lib/x86_64-linux-gnu/libc-2.13.so
  • /lib32/libc-2.13.so

I assume the second one is a 32-bit library, for running 32-bit apps. There is no libc in /lib64.

And, yes, according to /usr/share/tcltk/tcl8.5/tcl8/platform-1.0.9.tm, with tcl_platform(wordSize) returning 8, it is going to look in /lib64 for libc*.so. So, the code is working as expected, but the libc is not where it is expected by platform.

However, it is what is reported as the correct location by Ubuntu 11.04. Among the Google hits I found was this one explains the move:
why-is-lib-libc-so-6-missing?

andreas.kupries
ActiveState Staff
Tue, 2011-05-10 08:45

Thanks for confirming my theory, and going beyond that, looking up the relevant Ubuntu FAQ.

I will try to get a modified general platform.tm to you as soon as possible. Basically put, I have to look at multiple paths now, both for 32 and 64 bit, to properly find the libc.

In the meantime you should be able to work around the issue by modifying usr/share/tcltk/tcl8.5/tcl8/platform-1.0.9.tm to use the proper paths for your system.

andreas.kupries
ActiveState Staff
Tue, 2011-05-10 09:14

Ok, I have something which looks like it may work more generally.
Where should I send this ?

buchs | Wed, 2011-05-11 03:52

Andreas,

Thanks. You can send it to kevin DOT buchs DOT junk AT gmail DOT com.

I did some editing of platform...tm to change it to point to my specific location. I edited the file in /usr/share/tcltk... That wasn't enough, however, as the repository still thought it was "unknown". I deleted and recreated the repository and yet that wasn't enough. The story continues....

I was trying to do the install and work with ActiveTcl as a mere user and not root (sudo) so I would have access to everything without having to use sudo all the time. What I needed to do (or at least this is what worked) was reinstall ActiveTcl as sudo. All the following operations I did as su. Then I noticed that it was pulling platform...tm from /opt/ActiveTcl-8.5/lib/tcl8/8.4/ rather than /usr/share/tcltk...

I was wondering why AT was referencing a script outside of its install directory, as that didn't seem to fit the rest of the way it worked. Anyway, that referenced location changed when I did a sudo install and it is now self-contained.

So, I edited the platform...tm, but then the repository still thought it was "unknown". Because I thought it wasn't working to delete/create the repo I went in and edited the .conf file in lib/teapot and put in the correct clib. Then I had to relink tclsh. Then it finally allowed me to install that sound package.

andreas.kupries
ActiveState Staff
Wed, 2011-05-11 08:12

Ok, I will send my file to that address.

And you are right, the repository stores platform information in the .conf file about the linked shells. I forgot that, sorry about that.