Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260143 - Patches to fix build errors for dev-lang/python-2.5.4-r2 on IRIX
Summary: Patches to fix build errors for dev-lang/python-2.5.4-r2 on IRIX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-24 16:48 UTC by Stuart Shelton
Modified: 2009-02-26 19:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patches to allow python-2.5.4-r2 to build on IRIX (almost) cleanly (python-2.5.4-r2.patch,3.61 KB, patch)
2009-02-24 16:49 UTC, Stuart Shelton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2009-02-24 16:48:41 UTC
python has a number of issues when building on IRIX - mostly due to its outdated (o)32 ABI support.

It appears that the only thing really broken is ffi closures, which lack IRIX n32 support.  I'm not sure how significant this is in the scheme of things, but it does prevent Modules/_ctypes from being built...
Comment 1 Stuart Shelton 2009-02-24 16:49:31 UTC
Created attachment 183031 [details, diff]
Patches to allow python-2.5.4-r2 to build on IRIX (almost) cleanly
Comment 2 Fabian Groffen gentoo-dev 2009-02-25 19:13:14 UTC
Does this mean the patch is not yet complete?  Do you by chance have the ability to test the patch on other platforms?  Some of the ifdef changes and casts might barf, but I'm not at all sure of that.
Comment 3 Stuart Shelton 2009-02-26 10:57:29 UTC
I think that the patch is as complete as it's going to get... Python-2.5 seems to bundle a 6-year old version of ffi, and whilst this was written with o32/n32/64 ABI support, FFI closures are only implemented for the o32 ABI.  It's beyond my ability to re-implement ffi for n32, and I dread to think of the regression issues of porting a later libffi into Python.

Having said this, the libffi homepage lists the supported platforms as:

"mips o32 linux (little endian)"

... so it may be that nothing other than o32 will ever be usable :(

I can try the patch on x86-64 Linux, to see if it does any harm.  The changes to Modules/_ctypes/libffi/src/mips/ffitarget.h should probably be wrapped in a '#ifndef __GNUC' (or whatever the correct symbol is), but I think that the remainder are all correct even for GCC on other platforms (and it's just that GCC isn't sufficiently verbose by default to alert anyone)
Comment 4 Fabian Groffen gentoo-dev 2009-02-26 19:31:44 UTC
patch applied, thanks!