Skip to content
Tcl Source Code History Of Ticket 7dc0420245e1d460
Login

History Of Ticket 7dc0420245e1d460

Artifacts Associated With Ticket 7dc0420245e1d460

  1. Ticket change [45fdd74a3a] (rid 258987) by serhiy.storchaka on 2026-10-18 10:31:31:

    1. cmimetype initialized to: "text/x-fossil-wiki"
    2. comment initialized 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 initialized to: "9.0.5, 9.1.0"
    4. login: "serhiy.storchaka"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. severity initialized to: "Minor"
    8. status initialized to: "Open"
    9. subsystem initialized to: "53. Configuration and Build Tools"
    10. title initialized to:
      tcltk-man2html.tcl: a Tk tree found next to --srcdir breaks the Tcl paths (exit 1, "not table of contents")
      
    11. type initialized to: "Bug"
  2. Ticket change [061a7022ad] (rid 259540) by serhiy.storchaka on 2026-10-20 18:11:29:

    1. submitter changed to: "serhiy.storchaka"
  3. Ticket change [30d44e5a12] (rid 259811) by dgp on 2026-10-21 17:53:45:

    1. assignee changed to: "dkf"
    2. closer changed to: "nobody"
    3. 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]).
      
    4. login: "dgp"
    5. mimetype: "text/plain"