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.

Title: gnu_get_libc_version() returns bad number on Ubuntu 64 bits
Type: Stage:
Components: ctypes Versions: Python 2.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: theller Nosy List: smartini, theller
Priority: normal Keywords:

Created on 2009-01-06 01:18 by smartini, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg79223 - (view) Author: sébastien martini (smartini) Date: 2009-01-06 01:18
System: Ubuntu 8.10 Desktop AMD 64
Processor: Intel Core i7
Python: 2.5.2

While raw C code:

#include <gnu/libc-version.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
  printf("GNU libc version: %s\n", gnu_get_libc_version());
  return 0;

GNU libc version: 2.8.90

Python ctypes seems to bug:
$ python
Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, ctypes, ctypes.util
>>> sys.version
'2.5.2 (r252:60911, Oct  5 2008, 19:29:17) \n[GCC 4.3.2]'
>>> sys.platform
>>> LIBC = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
>>> LIBC
<CDLL '', handle 7f6d83122958 at 7f6d82fe8210>
>>> LIBC.gnu_get_libc_version()
msg79226 - (view) Author: sébastien martini (smartini) Date: 2009-01-06 03:06
Ooops, my mistake, there is nothing wrong, this report can be closed, sorry.
Date User Action Args
2022-04-11 14:56:43adminsetgithub: 49104
2009-01-06 03:41:25benjamin.petersonsetstatus: open -> closed
resolution: not a bug
2009-01-06 03:06:30smartinisetmessages: + msg79226
2009-01-06 01:18:44smartinicreate