Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #56757
| References | (3 earlier) <mailman.1030.1381562417.18130.python-list@python.org> <l3av5f$gi2$1@dont-email.me> <l3b294$kkv$2@ger.gmane.org> <CALwzidnBLYrQrdbYWjEA4qbbidpDW81DTR2=ok3g8aHvckSVag@mail.gmail.com> <l3brkn$aq4$1@ger.gmane.org> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2013-10-12 14:28 -0600 |
| Subject | Re: What version of glibc is Python using? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1045.1381610118.18130.python-list@python.org> (permalink) |
On Sat, Oct 12, 2013 at 9:59 AM, Terry Reedy <tjreedy@udel.edu> wrote: > On 10/12/2013 7:43 AM, Ian Kelly wrote: >> >> On Sat, Oct 12, 2013 at 2:46 AM, Terry Reedy <tjreedy@udel.edu> wrote: >>> >>> On 10/12/2013 3:53 AM, Christian Gollwitzer wrote: >>>> >>>> >>>> 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. > > > Was this always presence and missed, or has it been added in say, the last > 10 years? Reading the docs more closely, I think that the function is actually working as intended. It says that it determines "the libc version against which the file executable (defaults to the Python interpreter) is linked" -- or in other words, the minimum compatible libc version, NOT the libc version that is currently loaded. So I think that a patch to replace this with gnu_get_libc_version() should be rejected, since it would change the documented behavior of the function. It may be worth considering adding an additional function that matches the OP's expectations, but since it would just be a simple ctypes wrapper it is probably best done by the user.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What version of glibc is Python using? John Nagle <nagle@animats.com> - 2013-10-11 23:34 -0700
Re: What version of glibc is Python using? Christian Gollwitzer <auriocus@gmx.de> - 2013-10-12 08:50 +0200
Re: What version of glibc is Python using? John Nagle <nagle@animats.com> - 2013-10-12 00:03 -0700
Re: What version of glibc is Python using? Ned Deily <nad@acm.org> - 2013-10-12 00:20 -0700
Re: What version of glibc is Python using? Christian Gollwitzer <auriocus@gmx.de> - 2013-10-12 09:53 +0200
Re: What version of glibc is Python using? Christian Gollwitzer <auriocus@gmx.de> - 2013-10-12 10:34 +0200
Re: What version of glibc is Python using? Terry Reedy <tjreedy@udel.edu> - 2013-10-12 04:46 -0400
Re: What version of glibc is Python using? Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-12 05:43 -0600
Re: What version of glibc is Python using? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-12 13:08 +0000
Re: What version of glibc is Python using? Nobody <nobody@nowhere.com> - 2013-10-12 20:02 +0100
Re: What version of glibc is Python using? John Nagle <nagle@animats.com> - 2013-10-13 00:45 -0700
Re: What version of glibc is Python using? Terry Reedy <tjreedy@udel.edu> - 2013-10-12 11:59 -0400
Re: What version of glibc is Python using? Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-12 14:28 -0600
Re: What version of glibc is Python using? John Nagle <nagle@animats.com> - 2013-10-13 10:43 -0700
Re: What version of glibc is Python using? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-13 19:06 +0100
Re: What version of glibc is Python using? Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-13 12:06 -0600
csiph-web