Bug#349302: itcl3-dev: Can't find a usable itcl.tcl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug#349302: itcl3-dev: Can't find a usable itcl.tcl

Kari Pahula-2
Package: itcl3-dev
Version: 3.2.1-3.1
Severity: important

Now, I admit that this bug report may be bogus, as I am no expert on
Tcl and can't really tell if I'm mistaken myself somehow.

That being said, here's a little program I wrote (to test iwidgets
really, but I didn't get quite that far with it):

// conftest.c
#include <tcl.h>
#include <stdio.h>

int main() {
    Tcl_Interp *interp;
    const char *cmd = "package require Iwidgets";
    interp = Tcl_CreateInterp();
    // Why do I get an error (too) if I remove this?
    Tcl_Eval(interp, "lappend tcl_library /usr/lib/tcl8.4");
    if (Itcl_Init(interp) == TCL_ERROR) {
      printf("Itcl_Init call failed, error:\n%s\n", interp->result);
        return 1;
    if (Tcl_Eval(interp, cmd) != TCL_OK || interp->result[0] == '\0') {
      printf("Tcl_Eval failed\n");
        return 1;
    return 0;

I compiled it with gcc -o conftest -g -I/usr/include/tcl8.4 conftest.c -ltcl8.4 -litcl3.2

The output I get from that is:
Itcl_Init call failed, error:
Can't find a usable itcl.tcl in the following directories:
    /usr/lib/itcl3.2 ./../lib/itcl3.2 ./../library ./../../library ./../../itcl/library ./../../../itcl/library
This probably means that Itcl/Tcl weren't installed properly.
If you know where the Itcl library directory was installed,
you can set the environment variable ITCL_LIBRARY to point
to the library directory.

The relevant parts of a strace dump:
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=131, ...}) = 0
lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=81920, ...}) = 0
lstat64("/usr/lib/itcl3.2", {st_mode=S_IFDIR|0755, st_size=60, ...}) = 0
stat64("/usr/lib/itcl3.2/itcl.tcl", {st_mode=S_IFREG|0644, st_size=5000, ...}) = 0
open("/usr/lib/itcl3.2/itcl.tcl", O_RDONLY|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbff73878) = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x808f000)                          = 0x808f000
read(6, "#\n# itcl.tcl\n# -----------------"..., 4096) = 4096
read(6, "--------------------------------"..., 4096) = 904
read(6, "", 4096)                       = 0
close(6)                                = 0

After which it tries to open itcl.tcl from the places listed above.

This is not supposed to happen, right?

Also, if I comment out the first Tcl_Eval call, I get:
Itcl_Init call failed, error:
can't read "tcl_library": no such variable

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14
Locale: LANG=C, LC_CTYPE=fi_FI@euro (charmap=ISO-8859-15)

Versions of packages itcl3-dev depends on:
ii  itcl3                         3.2.1-3.1  [incr Tcl] OOP extension for Tcl -
ii  libc6-dev                     2.3.5-12   GNU C Library: Development Librari
ii  tcl8.4-dev                    8.4.11-1.1 Tcl (the Tool Command Language) v8

Versions of packages itcl3-dev recommends:
ii  itcl3-doc                     3.2.1-3.1  [incr Tcl] OOP extension for Tcl -

-- no debconf information

To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]