Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'broken': 0.04; 'say,': 0.05; 'subject:Python': 0.06; 'assign': 0.07; 'binary': 0.07; 'matches': 0.07; 'appropriate.': 0.09; 'executable': 0.09; 'explanation': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sells': 0.09; 'subject:using': 0.09; 'subject:version': 0.09; 'used.': 0.09; 'python': 0.11; 'jan': 0.12; 'add-ons': 0.16; 'conditional': 0.16; 'itself,': 0.16; 'outdated': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'symbols': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'module': 0.19; 'version.': 0.19; 'written': 0.21; '>>>': 0.22; 'saying': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; 'script.': 0.24; 'decide': 0.24; 'versions': 0.24; 'compiled': 0.26; 'this:': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'appear': 0.29; 'am,': 0.29; 'patch': 0.29; 'thus': 0.29; 'wonder': 0.29; 'needed.': 0.30; 'easier': 0.31; 'ctypes': 0.31; 'table,': 0.31; 'probably': 0.32; 'compatible': 0.32; 'another': 0.32; 'comment': 0.34; 'knowledge': 0.35; 'done.': 0.35; 'add': 0.35; 'really': 0.36; 'done': 0.36; 'subject:?': 0.36; 'should': 0.36; 'christian': 0.38; 'expected': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; '12,': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'ian': 0.60; 'received:173': 0.61; 'such': 0.63; 'become': 0.64; 'different': 0.65; 'obvious': 0.74; '3.4': 0.84; 'received:fios.verizon.net': 0.84; 'opens': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: What version of glibc is Python using? Date: Sat, 12 Oct 2013 11:59:25 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-59-117-133.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381593581 news.xs4all.nl 15941 [2001:888:2000:d::a6]:34435 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56747 On 10/12/2013 7:43 AM, Ian Kelly wrote: > On Sat, Oct 12, 2013 at 2:46 AM, Terry Reedy 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? >> So *please* submit a patch with explanation. > > Easier said than done. The module is currently written in pure > Python, and the comment "Note: Please keep this module compatible to > Python 1.5.2" would appear to rule out the use of ctypes to call the > glibc function. I wonder though whether that comment is really still > appropriate. I do not see that line in the 3.4 version. Anyway, submit a patch with explanation and assign the issue to "lemburg", who is the maintainer. (He sells 3rd party add-ons and obvious uses this function for those.) He can decide if a conditional (>2.4) is needed. -- Terry Jan Reedy