Skip to content
Tcl Source Code History Of Ticket 61ba0b0661
Login

History Of Ticket 61ba0b0661

Artifacts Associated With Ticket 61ba0b0661

  1. Ticket change [7fc077c1b5] (rid 254832) by tomkiti on 2026-07-10 18:07:14:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      The latest patch of `platform.tcl` [086b65e08f] throws an error on RHEL 8, 9, and 10:
      
          package require platform
          puts [platform::identify]
      
          can't read "v": no such variable
              while executing
          "split $v ."
      
      `platform::identify` was changed from executing `libc.so` to executing `ldd --version` (https://core.tcl-lang.org/tcl/tktview/917c4a896afc744d7d5310a68ceccad4afcb2a6e). On Red Hat 10, the output is:
      
          bash-5.2$ ldd --version
          ldd (GNU libc) 2.39
          Copyright (C) 2024 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions.  There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
          Written by Roland McGrath and Ulrich Drepper.
      
      The new patch uses the regular expression `GLIBC ([0-9]+(\.[0-9]+)*)`, which does not match the output, so the variable `v` is never set. Suggest matching just the version number at the end of the first line.
      
    5. foundin initialized to: "tip"
    6. is_private initialized to: "0"
    7. login: "tomkiti"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "1c57e67924247fd7926e89348f266c081ec57db2"
    10. resolution initialized to: "None"
    11. severity initialized to: "Critical"
    12. status initialized to: "Open"
    13. submitter initialized to: "tomkiti"
    14. subsystem initialized to: "81. Bundled Packages"
    15. title initialized to: "platform::identify broken on Red Hat Linux"
    16. type initialized to: "Bug"
  2. Ticket change [1a54a45cf7] (rid 254833) by apnadkarni on 2026-07-11 03:11:34:

    1. icomment:
      I'm not a big fan of executing external programs. Aside from security implications, output formats can change between different versions of the program or even between different localized platforms for the same version (at least on Windows, not sure about Linux/Unix).
      
      I suspect the regexp will also fail for alternative Linux runtimes like musl.
      
      Since `platform::identify` on Linux seems to mean the glibc version, would an alternative solution be to include the result of `gnu_get_libc_version` in the `tcl::build-info` and pick up the value from there? (Of course under __GLIBC__ conditional, "unknown" otherwise.)
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [75cf85b622] (rid 254834) by jan.nijtmans on 2026-07-11 10:53:14:

    1. icomment:
      `tcl::build-info` is meant for information about how Tcl was built. The runtime glibc version doesn't belong there. But it could be added as a ::tcl::unsupported command, picked up by platform::identify if available (giving 'unknown' when not available).
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [068f99d1b6] (rid 254882) by jan.nijtmans on 2026-07-13 12:13:27:

    1. icomment:
      How about [c70ad78618832726|this]?
      
      Thinking about it, I doubt the usefulness of the glibc version number in the identity. It would be more useful to just detect glibc vs musl vs unknown. Applications compiled for musl won't run on glibc-based linux and reverse, so that's useful to detect here.
      
      Since platform::identity is broken already for a long time (always returning *-unknown-*), I doubt it's worth to make it more elaborate than this.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [894b333011] (rid 254883) by jan.nijtmans on 2026-07-13 13:59:54:

    1. icomment:
      I tried this on Alpine Linux: It doesn't work yet, because "ldd --version" writes to stderr in stead of stdout. This can be handled, but isn't done yet in this branch.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  6. Ticket change [01cbdf4461] (rid 254888) by apnadkarni on 2026-07-14 05:19:08:

    1. icomment:
      The only use I have personally found for platform::identify is to distribute multiplatform packages on Windows with the shared libraries under the subdirectories as returned by platform::identify. I don't know if this kind of installation also makes sense for platforms other than Windows but if so, would there be compatibility issues by removing the version?
      
      Other than that, not competent enough to comment.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  7. Ticket change [f21fad729a] (rid 254894) by jan.nijtmans on 2026-07-14 08:13:59:

    1. icomment:
      > would there be compatibility issues by removing the version?
      
      I don't expect so, since this has been broken a long time, just returning linux-unknown-${cpu} for a long time. No-one reported this.
      
      For Linux I expect the same usage as you describe for Windows. It would be possible to make subdirectories for every possible value of platform::identity. If we have the glibc version number in it, it would mean the user has to create shared libraries for every possible version of glibc. I don't think that's usefull.
      
      Anyway, I now committed the fix to trunk. It now works for Linux (either 'glibc', 'musl' or 'unknown'). If it causes problems, please report it!
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  8. Ticket change [67bee23041] (rid 254905) by tomkiti on 2026-07-14 11:57:10:

    1. icomment:
      On RHEL 10, `platform::identify` now returns `linux-glibc-x86_64`. I need it to return `linux-glibc2.39-x86_64`, since I support multiple platforms and use that string as a directory name to store the binary libraries. Since RHEL 9, I've just been patching the glob pattern in `::platform::LibcVersion` from `libc*` to `libc.so.*`.
      
    2. login: "tomkiti"
    3. mimetype: "text/x-markdown"
    4. username: "tomkiti"
  9. Ticket change [cd60fbf957] (rid 254906) by jan.nijtmans on 2026-07-14 13:26:26:

    1. icomment:
      @tomkiti. Are you providing binaries for glibc 2.39, 2.40, 2.41, 2.42, 2.43 ....   ? Would it be possible to produce a binary for glibc 2.38 (for example) and store it in a directory linux-glibc-x86_64 in addition to linux-glibc2.38-x86_64? This binary should work with higher glibc versions as well, isn't it?
      
      I realize this is a change, but since glibc versions change twice a year I don't think it's reasonable to provide a binary for so many different glibc versions.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  10. Ticket change [81323e7105] (rid 254930) by tomkiti on 2026-07-14 16:54:37:

    1. icomment:
      I've been using `platform::identify` since glibc2.5 (RHEL 5) in 2007. My architecture depends on the string including the version number. This scheme has worked flawlessly for 19 years across numerous Linux varieties. I'm sure the proposed change would affect many other people besides myself.
      
    2. login: "tomkiti"
    3. mimetype: "text/x-markdown"
    4. username: "tomkiti"
  11. Ticket change [61195c8e24] (rid 254931) by jan.nijtmans on 2026-07-14 20:55:58:

    1. assignee changed to: "jan.nijtmans"
    2. icomment: "Thanks! I'll revisit this after my vacation"
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  12. Ticket change [63287aa65a] (rid 255056) by anonymous on 2026-07-27 21:04:08:

    1. icomment:
      The current version breaks `platform::patterns`, when running 
      
          > tclsh platform.tcl
      
      
          tcl_platform(byteOrder)     = littleEndian
          tcl_platform(engine)        = Tcl
          tcl_platform(machine)       = x86_64
          tcl_platform(os)            = Linux
          tcl_platform(osVersion)     = 6.17.0-35-generic
          tcl_platform(pathSeparator) = :
          tcl_platform(platform)      = unix
          tcl_platform(pointerSize)   = 8
          tcl_platform(user)          = obermeier
          tcl_platform(wordSize)      = 8
          ====================================
          Generic identification: linux-x86_64
          Exact identification:   linux-glibc-x86_64
          ====================================
          Search patterns:
          expected integer but got ""
              while executing
          "incr minor -1"
              (procedure "::platform::patterns" line 19)
              invoked from within
          "::platform::patterns [::platform::identify]"
              invoked from within
          "if {[info exists argv0] && ($argv0 eq [info script])} {
              puts ====================================
              parray tcl_platform
              puts ===============..."
              (file "platform.tcl" line 351)
      
      Paul
      
    2. login: "anonymous"
    3. mimetype: "text/x-markdown"
  13. Ticket change [bc32aec2bf] (rid 256147) by jan.nijtmans on 2026-09-09 12:51:40:

    1. icomment:
      The `platform::patterns` problem should be fixed [aa19237f0855e463|here]
      
      Still having a further look ....
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  14. Ticket change [856670babb] (rid 256484) by tomkiti on 2026-09-18 18:01:57:

    1. icomment:
      Are you going to remove the glibc version number? If so, I'll have to maintain my own version of platform.tcl forever because I depend on it.
      
    2. login: "tomkiti"
    3. mimetype: "text/plain"
  15. Ticket change [6bfa77cc30] (rid 256787) by jan.nijtmans on 2026-09-21 10:02:38:

    1. icomment:
      Platform-1.1 has been broken a long time, always giving linux-unknown-$cpu, and it never worked on musl. Also glibc 2.x is always upwards compatible. So, applications compiled with an older glibc 2.x version always works fine on a newer glibc 2.x version. Therefore - the solution is to always compile applications/extensions against the oldest glibc version you want to support.
      
      So, how about upwards/backwards compatibility. I propose to add the linux-glibc-$cpu and linux-unknown-$cpu directories to platform-1.1.2.  This way, those directories can always be found, and you can simply place your binary in "linux-glibc-$cpu", without the need for further version numbers. If you still want to support older platform versions, just create a link from the linux-glibc-$cpu directory to linux-glibc?.?-$cpu directory (where ?.? stands for the oldest glibc version you support).
      
      This way, you have the choice to stick with platform-1.1.x or switch to platform-1.2.x, this directory structure will continue to work with both.
      I won't backport platform-1.2.x to Tcl 9.0, in order to give more time to make the switch.
      
      In short: The "linux-unknown-$cpu" is meant for extensions with statically linked libc (could be glibc, musl or any other). "linux-glibc-$cpu" is meant for linking against glibc, "linux-musl-$cpu" is meant for linking against musl. Note that platform-1.1 won't work with musl at all.
      
      Hope this helps,
          Jan Nijtmans
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  16. Ticket change [e8e857f5fc] (rid 256791) by jan.nijtmans on 2026-09-21 11:43:41:

    1. icomment:
      Just as a demo, this is what "tclsh platform.tcl" gives on latest Linux (WSL).
      
      I don't think this is reasonable any more:
      <pre>
      ====================================
      tcl_platform(byteOrder)     = littleEndian
      tcl_platform(engine)        = Tcl
      tcl_platform(machine)       = x86_64
      tcl_platform(os)            = Linux
      tcl_platform(osVersion)     = 6.18.35.2-microsoft-standard-WSL2
      tcl_platform(pathSeparator) = :
      tcl_platform(platform)      = unix
      tcl_platform(pointerSize)   = 8
      tcl_platform(user)          = jan
      tcl_platform(wordSize)      = 8
      ====================================
      Generic identification: linux-x86_64
      Exact identification:   linux-glibc2.43-x86_64
      ====================================
      Search patterns:
      * linux-glibc2.43-x86_64
      * linux-glibc2.42-x86_64
      * linux-glibc2.41-x86_64
      * linux-glibc2.40-x86_64
      * linux-glibc2.39-x86_64
      * linux-glibc2.38-x86_64
      * linux-glibc2.37-x86_64
      * linux-glibc2.36-x86_64
      * linux-glibc2.35-x86_64
      * linux-glibc2.34-x86_64
      * linux-glibc2.33-x86_64
      * linux-glibc2.32-x86_64
      * linux-glibc2.31-x86_64
      * linux-glibc2.30-x86_64
      * linux-glibc2.29-x86_64
      * linux-glibc2.28-x86_64
      * linux-glibc2.27-x86_64
      * linux-glibc2.26-x86_64
      * linux-glibc2.25-x86_64
      * linux-glibc2.24-x86_64
      * linux-glibc2.23-x86_64
      * linux-glibc2.22-x86_64
      * linux-glibc2.21-x86_64
      * linux-glibc2.20-x86_64
      * linux-glibc2.19-x86_64
      * linux-glibc2.18-x86_64
      * linux-glibc2.17-x86_64
      * linux-glibc2.16-x86_64
      * linux-glibc2.15-x86_64
      * linux-glibc2.14-x86_64
      * linux-glibc2.13-x86_64
      * linux-glibc2.12-x86_64
      * linux-glibc2.11-x86_64
      * linux-glibc2.10-x86_64
      * linux-glibc2.9-x86_64
      * linux-glibc2.8-x86_64
      * linux-glibc2.7-x86_64
      * linux-glibc2.6-x86_64
      * linux-glibc2.5-x86_64
      * linux-glibc2.4-x86_64
      * linux-glibc2.3-x86_64
      * linux-glibc2.2-x86_64
      * linux-glibc2.1-x86_64
      * linux-glibc2.0-x86_64
      * linux-glibc-x86_64
      * linux-unknown-x86_64
      * tcl
      ====================================
      </pre>
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      </pre>
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  17. Ticket change [554e98dcd6] (rid 256799) by oehhar on 2026-09-21 14:38:11:

    1. icomment:
      The biweekly telco of today has agreed to remove the glibc version from the choices for 9.1.
      Any comments to this, please speak up here.
      
      Thanks for all,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  18. Ticket change [1935603eaa] (rid 256817) by jan.nijtmans on 2026-09-22 07:34:00:

    1. closedate changed to: "2461305.8152812733"
    2. closer changed to: "jan.nijtmans"
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"