This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: parsing of ldconfig output in ctypes/utils.py depends on the locale
Type: Stage:
Components: ctypes Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: theller Nosy List: doko, martin.panter, python-dev, theller
Priority: normal Keywords: patch

Created on 2009-11-19 14:33 by doko, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
util.py.diff doko, 2009-11-19 14:33 proposed patch
Messages (8)
msg95475 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2009-11-19 14:33
% /sbin/ldconfig -p | grep GL
    libGLU.so.1 (libc6) => /usr/lib/libGLU.so.1
    libGLEW.so.1.5 (libc6) => /usr/lib/libGLEW.so.1.5
    libGL.so.1 (libc6, Système d'exploitation ABI : Linux 2.4.20) =>
/usr/lib/libGL.so.1

the regexp fails to parse this. proposing to set LANG=C when calling
ldconfig.
msg95500 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2009-11-19 17:33
I'm curious:  Which output do you get from:
  'LANG=C /sbin/ldconfig -p | fgrep GL'
msg95506 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2009-11-19 18:43
$ LANG=C /sbin/ldconfig -p | fgrep GL
	libGLU.so.1 (libc6) => /usr/lib/libGLU.so.1
	libGLEW.so.1.5 (libc6) => /usr/lib/libGLEW.so.1.5
	libGL.so.1 (libc6, OS ABI: Linux 2.4.20) => /usr/lib/libGL.so.1
msg95513 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2009-11-19 19:50
I assume the patch is fine, would you like to apply it?  Thanks.
msg101109 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2010-03-15 13:51
fixed for 2.7, 3.1, 3.2, will fix for 2.6 after the 2.6.5 release.
msg101357 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2010-03-20 02:21
committed to the 2.6 branch as well
msg268077 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-06-10 03:02
This was supposed to be fixed in 2.7 by r78979 and beb9d176503e. But those changes were made to the dead _findLib_ldconfig() function (later deleted as part of Issue 13979). I will port the changes to the live _findSoname_ldconfig() function.
msg268078 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-06-10 03:52
New changeset b4839797f482 by Matthias Klose in branch '2.7':
Issue #7356: ctypes.util: Make parsing of ldconfig output locale independent.
https://hg.python.org/cpython/rev/b4839797f482
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51605
2016-06-10 03:52:25python-devsetnosy: + python-dev
messages: + msg268078
2016-06-10 03:02:19martin.pantersetnosy: + martin.panter
messages: + msg268077
2010-03-20 02:21:20dokosetstatus: open -> closed
resolution: fixed
messages: + msg101357
2010-03-15 13:51:49dokosetmessages: + msg101109
2009-11-19 19:50:04thellersetmessages: + msg95513
2009-11-19 18:43:13dokosetmessages: + msg95506
2009-11-19 17:33:29thellersetmessages: + msg95500
2009-11-19 14:33:07dokocreate