Possible bug with tclkit on 64bit platforms
Vadtec <[email protected]> Tue, 04 Sep 2007 21:52:07 -0000
| Newsgroups | gmane.comp.lang.tcl.starkit |
|---|---|
| Message-ID | <[email protected]> |
Hi,
jcw asked me to post this here. :)
I have been using tclkit on my CentOS box. I downloaded tclkit-linux-
x86_64 for my 64bit system. It works great, except for one problem. I
put a copy of tclkit into /usr/bin so that it would be usable by the
whole system. After some issues, and some prodding with strace and
sdiff, along with some help from GPS and a few others in #tcl/the
jabber chat, we believe there is an issue running tclkit on 64bit
platforms from out side the directory tclkit is in.
Some quick basic information about my tclkit and OS:
[vadtec@dhcp-192-168-0-14 tcl-tk]$ ./tclkit-linux-x86_64
% info patchlevel
8.4.15
[root@dhcp-192-168-0-14 tcl-tk]# uname -a
Linux dhcp-192-168-0-14 2.6.18-8.el5 #1 SMP Thu Mar 15 19:46:53 EDT
2007 x86_64 x86_64 x86_64 GNU/Linux
This box is running CentOS5, which is based on RHEL.
I have a copy of tclkit in /usr/bin as such:
[root@dhcp-192-168-0-14 tcl-tk]# stat /usr/bin/tclkit
File: `/usr/bin/tclkit'
Size: 1183664 Blocks: 2320 IO Block: 4096 regular
file
Device: fd00h/64768d Inode: 5109938 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/
root)
As well as the copy I originally downloaded in /home/vadtec/Downloads/
tcl-tk as such:
[root@dhcp-192-168-0-14 tcl-tk]# stat tclkit-linux-x86_64
File: `tclkit-linux-x86_64'
Size: 1876574 Blocks: 3680 IO Block: 4096 regular
file
Device: fd00h/64768d Inode: 1606711 Links: 1
Access: (0700/-rwx------) Uid: ( 500/ vadtec) Gid: ( 500/
vadtec)
(I have run both binaries as root and vadtec with the same results.)
Here is a link to the pastebin that I provided to GPS: http://paste.tclers.tk/372?v=raw
The left side is a run of tcklit from with in the same dir as the cwd.
The right side is a run of tclkit in /usr/bin from a different cwd.
There is two parts of this sdiff that stand out to me (and GPS).
First, the long listing of lseek's on the right hand side. This does
not seem normal to me.
The second part is right below the long list of lseek's. It starts at
the end of the list with a call to getcwd. This I believe is where the
issue lies. As you can see, there are 8 lines on the left side where
tclkit does things from within the cwd that it doesn't do outside the
cwd. The right side then goes on to try and open setup.tcl from the
regular FS, rather than the VFS.
lstat("/home/vadtec/Downloads/tcl-tk/tclkit-linux-x86_64", {s |
open("/home/vadtec/Downloads/tcl-tk/setup.tcl", O_RDONLY) = -
While I do not know why it's doing this, and unfortunately I do not
have the time to look at the C source, I believe my
64bit platform maybe be the root of this issue.
[12:09:26] · @ijchain · <GPS> Vadtec: I noticed something in the
output for the 2nd version that seems different. Do you have an
existing install of Tcl in /usr/ ? I noticed /usr/lib/tcl8.4 seems to
be a symbolic link to /usr/share/tcl8.4 is that correct?
[12:09:51] · Vadtec · yes
[12:10:05] · Vadtec · [root@dhcp-192-168-0-14 tcl-tk]# whereis tcl
[12:10:05] · Vadtec · tcl: /usr/lib/tcl8.4 /usr/lib/tcl8.5 /usr/local/
lib/tcl8.5 /usr/include/tcl.h /usr/share/tcl8.4
[12:10:27] · Vadtec · tclsh points to tcl8.4
[12:10:30] · Vadtec · not 8.5
[12:10:32] · @ijchain · <[email protected]> Emiliano has left
[12:11:09] · Vadtec · i also reinstalled my copy of tcl8.4 to make
sure 8.5 isn't getting in the way of anything
[12:11:11] · @ijchain · <GPS> for some reason tclkit is trying to use
your existing 8.4 encoding directory :-/
[12:11:27] · @ijchain · <GPS> rather than the internal VFS
I hope that helps shed some light on the issue.
Feel free to contact me if you need any more info about this error.
Vadtec