[Pkg-tcltk-devel] Bug#1119314: Bug#1119314: TCL fails to find 'libtk8.6.so' in '$auto_path' causing execution to fail

tomas at tuxteam.de tomas at tuxteam.de
Wed Oct 29 09:30:21 GMT 2025


On Wed, Oct 29, 2025 at 08:52:58AM +0000, daoneiel wrote:
> Package: tcl
> Package: tk
> 
> I am having trouble running my TCL app with this structure /project/main.tcl, data.tcl, db.tcl, gui.tcl, file.sqlite.
> The app functions fine as a single file. I broke it down into separate files to make maintaining it easier for future growth.
> 
> Note: I am learning to program so I am not sure how to diagnose the issue thoroughly.
> I have been using Grok to help me understand what happened.
> If I can do most of the work, through AI, without bothering a developer with my limitations, then I think it is a useful direction. My code could be incorrectly structured, so I explored this first.
> After it didn't appear to be a code structure issue I began to suspect a deeper issue.
> Since my error resolution skills are just emerging, I enlisted AI.
> I have removed the markdown structure.
> 
> The Error begins after main.tcl begins to execute, the error starts with 'source "db.tcl"'.
> 
> [code]
> /home/user/project-app/
> ├── main.tcl
> ├── db.tcl
> ├── gui.tcl
> ├── data.tcl
> ├── file.sqlite
> [/code]
> 
> Check with:
> [code]$ ls -l /home/user/project-app/[/code]
> The permissions for all of the .tcl files: -rw-rw-r--
> The permissions for one of the files, file.sqlite: -rwxrwxr-x
> I don't think this is an issue as 'tclsh' executes these scripts, they just need to be read/write accessible.
> 
> Check if '/home' is mounted with 'noexec':
> [code]bash
> mount | grep /home[/code]
> The home partition is not mounted with 'noexec'.
> 
> Everything passes until I get to checking tclsh 'Environement'. This is where it fails:
> 
> [code]
> % tclsh -c "puts $tcl_version; package require Tk; puts $tk_version"
> can't read "tk_version": no such variable
> [/code]

Your post is long, so I'll just answer this one with three notes:

- my version of tclsh (8.6, stock Debian bookworm) doesn't take an option
 "-c". I don't know what is going on here.

- *IF* you are invoking this from a(n Unix style) shell, it is the shell
  which is going to expand $tcl_version and $tk_version (because they are
  inside double quotes). Try single quotes to achieve more consistent
  results, then.

- Otherwise, doing "package require Tk ; puts $tk_version" outputs "8.6"
 on my computer.

And... don't learn programming with an LLM: it will feed you bullshit.

Cheers
-- 
t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-tcltk-devel/attachments/20251029/d1f3749b/attachment.sig>


More information about the Pkg-tcltk-devel mailing list