Fossil

Check-in [91eaef61]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Explained "Why can't we use Jim Tcl for the test suite?" in the auto.def comment above the check for a suitable tclsh version. Basically, I tried it and then documented a few of the resulting failures.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tclsh-macos
Files: files | file ages | folders
SHA3-256: 91eaef6131e816bdcab192bfd800e87de02302a330fcba6ecba796d996444191
User & Date: wyoung 2018-09-02 21:00:05.825
Context
2018-09-02
21:46
Fixed an incorrect Tcl string comparison checked in with [e449cb09]. ... (Closed-Leaf check-in: c94617b5 user: wyoung tags: tclsh-macos)
21:00
Explained "Why can't we use Jim Tcl for the test suite?" in the auto.def comment above the check for a suitable tclsh version. Basically, I tried it and then documented a few of the resulting failures. ... (check-in: 91eaef61 user: wyoung tags: tclsh-macos)
20:33
After autosetup checks for the existence of tclsh in the PATH, it now checks whether it's at least version 8.6, because macOS is still shipping 8.5, despite it being nearly 6 years old. If we find an old tclsh, try to find the Homebrew tcl-tk package, and use that version instead. This is not a macOS or Homebrew specific change in principle: we can extend this logic for other systems to find their best Tcl/Tk version, as needed.

On systems where autosetup is used, this only affects "make test". There are other uses of tclsh in this tree which may also benefit from our PATH discoveries, but this checkin doesn't update those.

This checkin also doesn't try to address similar problems on other platforms, such as the "TCLSH = tclsh" line in Makefile.mingw. ... (check-in: e449cb09 user: wyoung tags: tclsh-macos)

Changes
Unified Diff Ignore Whitespace Patch
Changes to auto.def.
31
32
33
34
35
36
37
38


39







40
41
42
43
44
45
46
cc-with {-includes {stdint.h inttypes.h}} {
    cc-check-types uint32_t uint16_t int16_t uint8_t
}

# Use pread/pwrite system calls in place of seek + read/write if possible
define USE_PREAD [cc-check-functions pread]

# Find tclsh for the test suite.  We can't use jimsh for this: the test


# suite uses features of Tcl that Jim doesn't support.







cc-check-progs tclsh
set hbtd /usr/local/Cellar/tcl-tk
if {[get-define TCLSH] != false} {
    set v [exec /bin/sh -c "echo 'puts \$tcl_version' | tclsh"]
    if {[expr $v >= 8.6]} {
        msg-result "Found Tclsh version $v in the PATH."
        define TCLSH tclsh







|
>
>
|
>
>
>
>
>
>
>







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cc-with {-includes {stdint.h inttypes.h}} {
    cc-check-types uint32_t uint16_t int16_t uint8_t
}

# Use pread/pwrite system calls in place of seek + read/write if possible
define USE_PREAD [cc-check-functions pread]

# Find tclsh for the test suite.
#
# We can't use jimsh for this: the test suite uses features of Tcl that
# Jim doesn't support, either statically or due to the way it's built by
# autosetup.  For example, Jim supports `file normalize`, but only if
# you build it with HAVE_REALPATH, which won't ever be defined in this
# context because autosetup doesn't try to discover platform-specific
# details like that before it decides to build jimsh0.  Besides which,
# autosetup won't build jimsh0 at all if it can find tclsh itself.
# Ironically, this means we may right now be running under either jimsh0
# or a version of tclsh that we find unsuitable below!
cc-check-progs tclsh
set hbtd /usr/local/Cellar/tcl-tk
if {[get-define TCLSH] != false} {
    set v [exec /bin/sh -c "echo 'puts \$tcl_version' | tclsh"]
    if {[expr $v >= 8.6]} {
        msg-result "Found Tclsh version $v in the PATH."
        define TCLSH tclsh