Comment 5 for bug 675064

Revision history for this message
Arfrever Frehtes Taifersar Arahesis (arfrever-fta) wrote :

I am packager of Python and Zope in Gentoo Linux and I know that there's no issue with the packaging. In C, functions defined without explicit type always return int. pyport.h defines PyMODINIT_FUNC as e.g. PyObject*. On 64-bit architectures: sizeof(int) == 32 bits, sizeof(pointer) == 64 bits. On 32-bit architectures: sizeof(int) == sizeof(pointer) == 32 bits. Lack of PyMODINIT_FUNC with Python 3 causes that the returned pointer is truncated on 64-bit architectures. You were using "PYTHONPATH=build/lib.linux-i686-3.1/", which suggests that you use a 32-bit architecture. Please read the patch, which I had attached. I also noticed that segmentation fault occurs only when some optimizations are enabled. I have exported CFLAGS="-march=core2 -O2".