|
2026-10-22
| ||
| 17:19 | • Ticket [2ef3430fdc] Don't assume that host=*mingw32* means cross-compiling</... artifact: ddaa1799b0 user: serhiy.storchaka | |
|
2026-10-20
| ||
| 15:33 | Fix [59a9b957c6] and [2ef3430fdc]: Windows "make distclean" removes tcl.pc; win/configure uses an in... check-in: 161779a5c4 user: serhiy.storchaka tags: core-8-6-branch | |
| 15:33 | Fix [59a9b957c6] and [2ef3430fdc]: Windows "make distclean" removes tcl.pc; win/configure uses an in... check-in: 063874bae3 user: serhiy.storchaka tags: core-9-0-branch | |
| 15:21 | • Closed ticket [2ef3430fdc]: Don't assume that host=*mingw32* means cross-com... artifact: b1d59a1a62 user: serhiy.storchaka | |
| 15:21 | Fix [59a9b957c6] and [2ef3430fdc]: Windows "make distclean" doesn't clean up tcl.pc; don't assume th... check-in: c87b92e2ee user: serhiy.storchaka tags: trunk, main | |
| 14:23 | • Ticket [2ef3430fdc] Don't assume that host=*mingw32* means cross-compiling</... artifact: 12f68e9c47 user: jan.nijtmans | |
| 13:27 | • Ticket [2ef3430fdc]: 4 changes artifact: 353c25ac61 user: serhiy.storchaka | |
| 13:25 | Fix [2ef3430fdc]: win/configure decides whether to use an installed tclsh from $cross_compiling, not... closed check-in: e4fd3a27b4 user: serhiy.storchaka tags: win-native-mingw-tclsh | |
|
2025-10-28
| ||
| 15:20 | • Ticket [2ef3430fdc] Don't assume that host=*mingw32* means cross-compiling</... artifact: 2f7c31766b user: oscarfv | |
| 12:32 | • Ticket [2ef3430fdc]: 3 changes artifact: b7cfef9f05 user: anonymous | |
| 10:53 | • Ticket [2ef3430fdc]: 3 changes artifact: d3afa5d7fe user: jan.nijtmans | |
|
2025-10-26
| ||
| 13:24 | • New ticket [2ef3430fdc]. artifact: 056307278b user: oscarfv | |
| Ticket UUID: | 2ef3430fdc612eb42a7a0aae7b3babed08d92c17 | ||
| Title: | Don't assume that host=*mingw32* means cross-compiling | ||
| Type: | Bug | Created on: | 2025-10-26 13:24:59 |
| Submitter: | oscarfv | Assigned to: | jan.nijtmans |
| Subsystem: | 53. Configuration and Build Tools | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2026-10-22 17:19:28 |
| Status: | Closed | Closed by: | serhiy.storchaka |
| Resolution: | Fixed | Closed on: | 2026-10-20 15:21:42 |
| Version: | 8.6.18, 9.0.5, 9.1.0 | ||
| Description: | ||||
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.
| ||||
| User Comments: | ||||
jan.nijtmans added on 2025-10-28 10:53:26:
I'm open to a better solution here anonymous added on 2025-10-28 12:32:09:
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.)
oscarfv added on 2025-10-28 15:20:55:
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
serhiy.storchaka added on 2026-10-20 13:27:21:
Confirmed with a native MSYS2 UCRT64 build: with no tclsh on PATH,
jan.nijtmans added on 2026-10-20 14:23:52:
I like this solution! +1 to merge | ||||
