python2.5 ctypes.c_longlong has wrong size (32 bits instead of 64)

Bug #71914 reported by David Cournapeau
4
Affects Status Importance Assigned to Milestone
python2.5 (Ubuntu)
Fix Released
Undecided
Matthias Klose

Bug Description

Binary package hint: python2.5

I have recently checked some of my python+ctypes code on python2.5 to find it did not work. After quite some time, I found out that ctypes.c_longlong is 32 bits, whereas it should be 64 bits.

I checked on two different machines (both edgy on x86). To reproduce the result, just execute :

python2.5 -c "from ctypes import c_longlong, sizeof; print sizeof(c_longlong)"

It will prints 4 instead of 8.

A manually installed python prints 8, so there is a problem in the packaging somewhere. Note that this problem is not present in python2.4-ctypes. Also, and I guess this is related, ctypes.c_int64 is not available.

description: updated
Revision history for this message
David Cournapeau (david-ar) wrote :

I've just reproduced the bug on my minimac (ppc) at home, also

Revision history for this message
David Cournapeau (david-ar) wrote :

After many different compilation of python2.5 from ubuntu packages and from original source (python.org), I managed to find the problem: the configuration option --with-system-ffi, which is used by the ubuntu package. If I use this option for original sources of python, I have the same problem.

I don't really understand how libffi is used, so I don't really know how to go further.

Revision history for this message
Matthias Klose (doko) wrote :

python2.5 2.5-5ubuntu1 is now configured without --with-system-ffi

Changed in python2.5:
assignee: nobody → doko
status: Unconfirmed → Fix Released
Revision history for this message
Daniel Albeseder (daniel-albeseder) wrote :

Will this bug be fixed in edgy as well?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.