Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6bfa77cc30da5dd29e84bbf100adb4ab4b9879a9852d0736a0c13598af5ce317
Ticket: 61ba0b0661a14a921665500d77e5d8ac2543724a
platform::identify broken on Red Hat Linux
User & Date: jan.nijtmans on 2026-09-21 10:02:38
Changes

  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"