You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Derive the Tcl interpreter shell from --with-tcl when --with-tclsh is not set #717
The configure script accepts two Tcl-related options that are handled independently:
--with-tcl gives the directory containing the tclConfig.sh Tcl configuration script and is only used to build the optional Tcl extension library,
--with-tclsh gives the name or full path of the Tcl interpreter shell that modulecmd.tcl and the other installed scripts will run with, and defaults to tclsh as found in PATH.
When Tcl is installed in a non-default location (a custom prefix, a Spack-installed Tcl, a vendor toolchain), the person building Modules has to pass both options and keep them consistent by hand. Forgetting --with-tclsh leads to a build where the extension library is compiled against one Tcl installation while the installed scripts are executed by whatever tclsh is first in PATH, which may be another version. This mismatch is not reported at build time and only shows up later, through a library load failure or subtle behavior differences. Feedback gathered at the HPSF Conference 2026 confirmed people hit this when building Modules against a Tcl that is not the system one, and that they expect a single option to be enough to point at a Tcl installation.
The need is for configure to use the Tcl installation designated by --with-tcl to locate the Tcl interpreter shell when --with-tclsh is not explicitly set: look for the tclsh binary relative to the given directory (typically the bin directory sibling of the lib directory holding tclConfig.sh, or the location recorded in the configuration script itself), and use it as the default interpreter for the installed scripts. An explicit --with-tclsh should still take precedence, so the two can be decoupled when needed. The resulting interpreter choice should be reported in the configure summary so it can be checked at a glance, and the documentation of both options should describe how they relate.
This would make building Modules against a specific Tcl installation a one-option operation and would remove a source of silent library/interpreter mismatch.
Activity