Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-01-31
02:28 • Closed ticket [3599098fff]: platform::identify returns wrong result for glibc-2.... artifact: 5f6576576e user: andreas_kupries
2013-01-30
13:13 • Ticket [3599098fff]: 4 changes artifact: e3898ec62f user: pawel_sikora
04:57 • Ticket [3599098fff]: 4 changes artifact: b7ab9fc31b user: andreas_kupries
2013-01-02
21:40 • Ticket [3599098fff]: 3 changes artifact: 9cbb8534ae user: dkf
2013-01-01
12:53 • New ticket [3599098fff]. artifact: e6412702ed user: pawel_sikora

platform::identify returns wrong result for glibc-2.17

Closed / Fixed3599098fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2013-01-01 12:53:26
# rpm -q glibc
glibc-2.17-1.i686
glibc-2.17-1.x86_64

# echo 'package require platform; set p [platform::identify]; puts $p' | tclsh
linux-glibc6.-x86_64
                 ^^^ should be 2.17 instread of "6."

the recent glibc versions allows to ./conifgure --with-pkgversion=PKG' (use PKG in the version string in place of "GNU libc").
so finally, the /lib64/libc-2.17.so returns e.g.:

$ /lib64/libc-2.17.so 
GNU C Library (glibc-6:2.17-1) stable release version 2.17, by Roland McGrath et al.
Copyright (C) 2012 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.
Compiled by GNU CC version 4.7.2 20121104 (release).
Compiled on a Linux 3.7.0 system on 2012-12-26.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://bugs.pld-linux.org/>.


tcl's platform packages needs better regexp for matching libc version.
dkf Ticket [3599098fff]: 3 changes [History diff]2013-01-02 21:40:40
andreas_kupriesplain2013-01-30 04:57:01
Can we assume that the 'version' string just before the 2.17 is fixed ?
pawel_sikoraplain2013-01-30 13:13:09
the glibc sources contains following banner in csu/version.c:

(...)
static const char __libc_release[] = RELEASE;
static const char __libc_version[] = VERSION;

static const char banner[] =
"GNU C Library "PKGVERSION RELEASE" release version "VERSION", by Roland McGrath et al.\n\
(...)

extending regexp to e.g.:   regexp {version ([0-9]+(\.[0-9]+)*), by } $vdata -> v
should be enough to correct version matching.
andreas_kupriesplain2013-01-31 02:28:54
allow_comments - 1

Thank you for looking into this. Making the change now.

[2798119d9f] @core-8-4-branch
[e70b932ea4] @core-8-5-branch
[cc69dcd0b5] @trunk
Log in (anonymous is fine) to add a comment.