Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 45fdd74a3a5c6c77471e7202de6a5c599ff85e175b1b63e4e4492cb517e38a04
Ticket: 7dc0420245e1d460c384806fc4a4f644e1e40006
tcltk-man2html.tcl: a Tk tree found next to --srcdir breaks the Tcl paths (exit 1, "not table of contents")
User & Date: serhiy.storchaka on 2026-10-18 10:31:31
Changes

  1. cmimetype changed to: "text/x-fossil-wiki"
  2. comment changed to:
    When Tk is not in the directory given with <tt>--srcdir</tt> (or the default <tt>../..</tt>), tools/tcltk-man2html.tcl looks for it in the parent directory too, and takes the first tree whose generic/tk.h has a matching version, even an unrelated one. With Tcl in <tt>a/tcl</tt> and Tk in <tt>tk</tt> next to <tt>a</tt>:
    
    <verbatim>
    $ tclsh tools/tcltk-man2html.tcl --srcdir=a --htmldir=out
    using Tcl source directory a/tcl
    using Tk source directory a/../tk
    ...
    scanning section Tcl Commands
    
    wish: KEYWORDS: make-manpage-section: not table of contents.
    </verbatim>
    
    and it exits with status 1, leaving incomplete output. <tt>findversion</tt> returns the parent directory as the new common prefix, which is stored in the variable <tt>tcltkdir</tt> shared with Tcl, so all Tcl paths (<tt>$tcltkdir/$tcldir</tt>) then point to a nonexistent <tt>a/../tcl</tt>. The version check only compares <tt><nowiki>[8-9].[0-9]</nowiki></tt>, so with 9.0 it also took a 9.1 Tk tree that happened to be there.
    
    Seen with 9.0.5 and 9.1.0; 8.6 does not search the parent directory and stops with "couldn't find Tk".
    
    Proposed fix in branch [/timeline?r=man2html-tk-beside|man2html-tk-beside]: when the Tcl help is built too, a Tk tree found outside the Tcl directory is not used. Without a usable Tk the tool builds the Tcl help only and says so, unless <tt>--tk</tt> was given, which is still an error (this also covers the case of [9babefdccc]).
    
  3. foundin changed to: "9.0.5, 9.1.0"
  4. login: "serhiy.storchaka"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. severity changed to: "Minor"
  8. status changed to: "Open"
  9. subsystem changed to: "53. Configuration and Build Tools"
  10. title changed to:
    tcltk-man2html.tcl: a Tk tree found next to --srcdir breaks the Tcl paths (exit 1, "not table of contents")
    
  11. type changed to: "Bug"