Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a3858ae7ee15ca9a333db8002beaa26d59cdba516a66fa0384e7ed255ba2891b
Ticket: dad36af8e573011e034bff3bfa051292b6e0159d
TCL_PACKAGE_PATH seems broken
User & Date: RogerO on 2024-09-19 08:52:23
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I am trying to use Tcl 8.6.15 on a Linux (openSUSE Tumbleweed) system. Not a newbie here. In the build of the latest 8.6.15, I have a problem with TCL_PACKAGE_PATH. When building, we define it via an environment variable:
    
    export TCL_PACKAGE_PATH="%scriptdir %_datadir/tcl"
    
    The build sets it as follows in tclConfig.sh:
    
    TCL_PACKAGE_PATH='/usr/lib64/tcl /usr/share/tcl'
    
    So I'm happy with the paths. These are the two directories in which to find packages.
    
    When I package require a package in, say /usr/share/tcl, it says the package cannot be found.
    
    I did a trace on the running program, and I see what I think are mysterious paths being explored. In #1 and #2 (below) there is a space after the path name. In #3 the full TCL_PACKAGE_PATH is being used. Close, but no cigar.
    
    read(0, "package require rsoft\n", 4096) = 22
    readlink("/usr", 0x7ffd5d2af6c0, 1023)  = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64", 0x7ffd5d2af6c0, 1023) = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64/tcl ", 0x7ffd5d2af6c0, 1023) = -1 ENOENT (No such file or directory)    <--- Mysterious #1
    access("/usr", F_OK)                    = 0
    access("/usr/lib64", F_OK)              = 0
    access("/usr/lib64/tcl ", F_OK)         = -1 ENOENT (No such file or directory)              <--- Mysterious #2
    readlink("/usr", 0x7ffd5d2af6c0, 1023)  = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64", 0x7ffd5d2af6c0, 1023) = -1 EINVAL (Invalid argument) 
    openat(AT_FDCWD, "/usr/lib64/tcl /usr/share/tcl/tclIndex", O_RDONLY) = -1 ENOENT (No such file or directory)  <--- Mysterious #3
    readlink("/usr", 0x7ffd5d2af6c0, 1023)  = -1 EINVAL (Invalid argument)
    readlink("/usr/lib", 0x7ffd5d2af6c0, 1023) = -1 EINVAL (Invalid argument)
    openat(AT_FDCWD, "/usr/lib/tclIndex", O_RDONLY) = -1 ENOENT (No such file or directory)
    readlink("/usr", 0x7ffd5d2af6c0, 1023)  = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64", 0x7ffd5d2af6c0, 1023) = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64/tcl", 0x7ffd5d2af6c0, 1023) = -1 EINVAL (Invalid argument)
    openat(AT_FDCWD, "/usr/lib64/tcl/tclIndex", O_RDONLY) = -1 ENOENT (No such file or directory)
    readlink("/usr", 0x7ffd5d2af720, 1023)  = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64", 0x7ffd5d2af720, 1023) = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64/tcl", 0x7ffd5d2af720, 1023) = -1 EINVAL (Invalid argument)
    readlink("/usr/lib64/tcl/tcl8.6", 0x7ffd5d2af720, 1023) = -1 EINVAL (Invalid argument)
    openat(AT_FDCWD, "/usr/lib64/tcl/tcl8.6/tclIndex", O_RDONLY) = 3
    
    Are we specifying the paths incorrectly? This is how it has been done in previous releases. And it worked then. But not in 8.6.15.
    
  5. foundin changed to: "8.6.15"
  6. is_private changed to: "0"
  7. login: "RogerO"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "24ab3f941a2549054954a1b77346bdbeb4bd69e6"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "RogerO"
  14. subsystem changed to: "55. Other Tools"
  15. title changed to: "TCL_PACKAGE_PATH seems broken"
  16. type changed to: "Bug"