Artifacts Associated With Ticket 2ef3430fdc
Ticket change [056307278b] (rid 247536) by oscarfv on 2025-10-26 13:24:59:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
win/configure has this: # Cross-compiling case ${host_alias} in *mingw32*) TCL_EXE="tclsh" ;; *) TCL_EXE="TCL_LIBRARY=\"\${LIBRARY_DIR}\"; export TCL_LIBRARY; ./\${TCLSH}" ;; esac The problem is that it assumes the existence of tclsh. When building under MSYS2 or Cygwin, that is not necessarily true, neither the pre-existing tclsh is required. The current behavior makes the build to fail under MSYS2/Cygwin unless the user has tclsh already installed. We either need a more robust mechanism for detecting a "true" cross-compilation and/or just test for the presence of tclsh at configure time. - is_private initialized to: "0"
- login: "oscarfv"
- priority initialized to: "5 Medium"
- private_contact initialized to: "becb0e4021beda640acc1b17b371abd9e9618647"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "oscarfv"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to:
Don't assume that host=*mingw32* means cross-compiling
- type initialized to: "Bug"
Ticket change [d3afa5d7fe] (rid 247660) by jan.nijtmans on 2025-10-28 10:53:26:
- icomment: "I'm open to a better solution here"
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [b7cfef9f05] (rid 247661) by anonymous on 2025-10-28 12:32:09:
- icomment:
What about using tclsh if it is available and the generated tclsh if it is not? AC_CHECK_PROG(TCL_EXE, tclsh, tclsh, "TCL_LIBRARY=\"\${LIBRARY_DIR}\"; export TCL_LIBRARY; ./\${TCLSH}") ... or always use the generated tclsh when we know that we can execute it (i.e. we are running on Windows): AC_CANONICAL_HOST case "${host_os}" in cygwin*|mingw*) TCL_EXE="TCL_LIBRARY=\"\${LIBRARY_DIR}\"; export TCL_LIBRARY; ./\${TCLSH}" ;; *) TCL_EXE="tclsh" ;; esac You can argue that the build will fail if it is a true cross-compilation and tclsh is absent, but that problem already exists with the current implementation. For improving that, the configure script could put a check for the existence of tclsh on the *) case above and throw an error when absent. (As I already mentioned, I don't really know about autotools, the above is the result of a quick web search.) - login: "anonymous"
- mimetype: "text/plain"
- icomment:
Ticket change [2f7c31766b] (rid 247666) by oscarfv on 2025-10-28 15:20:55:
- icomment:
Just in case you go with the second option and for the sake of completeness, let's cover MSYS* as well: AC_CANONICAL_HOST case "${host_os}" in cygwin*|msys*|mingw*) TCL_EXE="TCL_LIBRARY=\"\${LIBRARY_DIR}\"; export TCL_LIBRARY; ./\${TCLSH}" ;; *) TCL_EXE="tclsh" ;; esac - login: "oscarfv"
- mimetype: "text/plain"
- icomment:
Ticket change [353c25ac61] (rid 259424) by serhiy.storchaka on 2026-10-20 13:27:21:
- foundin changed to: "8.6.18, 9.0.5, 9.1.0"
- icomment:
Confirmed with a native MSYS2 UCRT64 build: with no tclsh on PATH, <code>make install</code> fails at install-tzdata with "tclsh: command not found". <code>win/configure.ac</code> treated any <code>*mingw32*</code> host as a cross build. Proposed fix in branch [e4fd3a27b4|win-native-mingw-tclsh]: use autoconf's <code>$cross_compiling</code> instead, which is what the anonymous comment asked for. Tested natively in MSYS2 (configure says "cross compiling... no", install works) and with a Linux MinGW cross build (still <code>TCL_EXE = tclsh</code>).
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
Ticket change [12f68e9c47] (rid 259465) by jan.nijtmans on 2026-10-20 14:23:52:
- assignee changed to: "jan.nijtmans"
- icomment:
I like this solution! +1 to merge
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [b1d59a1a62] (rid 259489) by serhiy.storchaka on 2026-10-20 15:21:42:
- login: "serhiy.storchaka"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [ddaa1799b0] (rid 259964) by serhiy.storchaka on 2026-10-22 17:19:28:
- closedate changed to: "2461334.140080405"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"