What version of glibc is Python using?

Terry Reedy tjreedy at udel.edu
Sat Oct 12 04:46:34 EDT 2013


On 10/12/2013 3:53 AM, Christian Gollwitzer wrote:
> Am 12.10.13 09:20, schrieb Ned Deily:
>> In article <l3as90$5bk$1 at dont-email.me>, John Nagle <nagle at animats.com>
>> wrote:
>> [...]
>>> Why is the info from "plaform.libc_ver()" so bogus?
>>
>> The code is here:
>>
>> http://hg.python.org/cpython/file/2.7/Lib/platform.py#l141
>>
>> Perhaps you could open an issue on the Python bug tracker.
>
> That function is really bogus. It states itself, that it has "intimate
> knowledge of how different libc versions add symbols to the executable
> and thus is probably only useable for executables compiled using gcc"
> which is just another way of saying "it'll become outdated and broken
> soon". It's not even done by reading the symbol table, it opens the
> binary and matches a RE *shocked* I would have expected such hacks in a
> shell script.
>
> glibc has a function for this:
>
>      gnu_get_libc_version ()
>
> which should be used.

So *please* submit a patch with explanation.

-- 
Terry Jan Reedy




More information about the Python-list mailing list