Artifacts Associated With Ticket 917c4a896a
Ticket change [a0fa9c6f26] (rid 217727) by mbwagner on 2023-09-05 12:55:18:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
The bundled `platform` package fails to find the version of glibc on the `ubuntu:22.04` Docker image. Steps to reproduce: `docker run -it ubuntu:22.04 apt-get update && apt-get install -y tcl tclsh package require platform platform::identify` Output is: `linux-unknown-x86_64` Expected output: `linux-glibc2.35-x86_64` This problem also occurs with the latest trunk, and is probably also present in a non-Docker Ubuntu install (but I could not test that). I looked at the code and the root cause seems to be missing execute permissions on `libc.so.6`. Currently the most popular way of finding the libc version seems to be to call `ldd --version` instead of the .so file directly. This outputs the libc version (among other stuff) on all Linux distros including MUSL-based ones, which would make it very easy to extend the code to detect MUSL versions too.
- foundin initialized to: "8.6 and trunk"
- is_private initialized to: "0"
- login: "mbwagner"
- priority initialized to: "5 Medium"
- private_contact initialized to: "8982a851333466c77485b64f16aa683016dd9fdc"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "mbwagner"
- subsystem initialized to: "81. Bundled Packages"
- title initialized to:
Glibc detection broken on Linux for platform::identify
- type initialized to: "Bug"
Ticket change [863c32ce5e] (rid 217736) by jan.nijtmans on 2023-09-05 15:07:53:
- assignee changed to: "aku"
- icomment:
@aku. Andreas, you seem to be most knowledgeable on the "platform" package
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [c9dfaece90] (rid 220554) by mbwagner on 2023-11-24 10:14:04:
- comment changed to:
The bundled `platform` package fails to find the version of glibc on the `ubuntu:22.04` Docker image. Steps to reproduce: `docker run -it ubuntu:22.04 apt-get update && apt-get install -y tcl tclsh package require platform platform::identify` Output is: `linux-unknown-x86_64` Expected output: `linux-glibc2.35-x86_64` This problem also occurs with the latest trunk, and is probably also present in a non-Docker Ubuntu install (~but I could not test that~, edit: confirmed on non-Docker Ubuntu 22.04 as well). I looked at the code and the root cause seems to be missing execute permissions on `libc.so.6`. Currently the most popular way of finding the libc version seems to be to call `ldd --version` instead of the .so file directly. This outputs the libc version (among other stuff) on all Linux distros including MUSL-based ones, which would make it very easy to extend the code to detect MUSL versions too.
- login: "mbwagner"
- mimetype: "text/plain"
- comment changed to:
Ticket change [7d84f1fb94] (rid 220555) by mbwagner on 2023-11-24 10:14:43:
- comment changed to:
The bundled `platform` package fails to find the version of glibc on the `ubuntu:22.04` Docker image. Steps to reproduce: `docker run -it ubuntu:22.04 apt-get update && apt-get install -y tcl tclsh package require platform platform::identify` Output is: `linux-unknown-x86_64` Expected output: `linux-glibc2.35-x86_64` This problem also occurs with the latest trunk, and is probably also present in a non-Docker Ubuntu install (~~but I could not test that~~, edit: confirmed on non-Docker Ubuntu 22.04 as well). I looked at the code and the root cause seems to be missing execute permissions on `libc.so.6`. Currently the most popular way of finding the libc version seems to be to call `ldd --version` instead of the .so file directly. This outputs the libc version (among other stuff) on all Linux distros including MUSL-based ones, which would make it very easy to extend the code to detect MUSL versions too.
- login: "mbwagner"
- mimetype: "text/plain"
- comment changed to:
Ticket change [9c03026535] (rid 254771) by tomkiti on 2026-07-08 11:43:30:
- icomment:
`platform::identify` is also broken on RHEL 9 and 10. `::platform::LibcVersion` uses the `glob` pattern `libc*`, which on RHEL 9 and 10 returns `libc.so` first, which is a text file. Changing the pattern to `libc.so.*` fixes it on my systems.
- login: "tomkiti"
- mimetype: "text/x-markdown"
- username: "tomkiti"
- icomment:
Ticket change [bed28e46e7] (rid 254788) by jan.nijtmans on 2026-07-08 15:31:59:
- assignee changed to: "jan.nijtmans"
- icomment:
Proposed fix [a1a9fbb461cb05be|here], based on the idea of running "ldd --version". Can be simplified further, but it appears to work. Please report whether this works for you. Thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Pending"
Ticket change [4b3edd5193] (rid 254809) by jan.nijtmans on 2026-07-09 10:35:57:
- closedate changed to: "2461230.9416352776"
- closer changed to: "jan.nijtmans"
- icomment:
Fixed [b1449b8027baf146|here] Thanks for the report, and for the fix suggestion.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- status changed to: "Closed"