Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 266471

Summary: dev-libs/libffi fails to build on MIPS
Product: Gentoo Linux Reporter: Joshua Kinard <kumba>
Component: New packagesAssignee: MIPS Porters <mips>
Status: RESOLVED FIXED    
Severity: normal CC: manuel.lauss, python, redhatter, ssuominen, toolchain
Priority: Highest    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 272046, 287383    
Attachments: Python 2.6 build failure on MIPS
python-2.6-mips.patch
Patch from upstream
Patch converted to =dev-libs/libffi-3.0.8.

Description Joshua Kinard gentoo-dev 2009-04-17 06:30:40 UTC
It appears this is an upstream bug in Python, back from when they imported the libffi3 branch into Python's code.  There's an open issue on Python's bug tracker for this that has no current resolution yet.  I poked it, and I'll see if that stirs any activity.

This bug is mostly a tracker I guess until the upstream people fix it, but if our pythons guys don't mind, I'd love to see rpetrov's latest patch on the issue (linked below) applied to our ebuilds to get us moving again.

http://bugs.python.org/issue4305
Comment 1 Joshua Kinard gentoo-dev 2009-04-17 06:31:21 UTC
Created attachment 188645 [details]
Python 2.6 build failure on MIPS
Comment 2 Zhang Le (RETIRED) gentoo-dev 2009-04-23 07:34:25 UTC
Hey, guys, I just made a patch which seems working
For more info:
http://groups.google.com/group/loongson-dev/browse_thread/thread/5fd62684a84ae9d2
Comment 3 Zhang Le (RETIRED) gentoo-dev 2009-04-23 07:36:14 UTC
Created attachment 189211 [details, diff]
python-2.6-mips.patch
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-24 03:07:21 UTC
Could you test the following patch?: http://svn.python.org/view?view=rev&revision=72083
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-25 17:45:04 UTC
Created attachment 192426 [details, diff]
Patch from upstream
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-13 20:20:14 UTC
*** Bug 268705 has been marked as a duplicate of this bug. ***
Comment 7 Stuart Longland (RETIRED) gentoo-dev 2009-08-02 00:58:17 UTC
I've been experiencing issues with Python 2.6 myself, so I'll take this patch for a spin and see how I go.

zhenghe python # emerge -av python

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS   ] dev-lang/python-2.6.2-r1 [2.5.4-r3] USE="berkdb doc examples gdbm ipv6 ncurses readline sqlite ssl threads tk xml -build -ucs2 -wininst" 0 kB

Total: 1 package (1 in new slot), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

Test Hardware/Kernel: Linux zhenghe 2.6.28.7-mipsgit-20090223-lm2e #1 Mon Mar 2 19:23:22 EST 2009 mips64 ICT Loongson-2 V0.2 FPU V0.1 lemote-fulong GNU/Linux
(chroot on USB HDD... I am in the process of building my Yeeloong's next OS)

I shall be back with results.
Comment 8 Stuart Longland (RETIRED) gentoo-dev 2009-08-02 01:11:26 UTC
Okay... looks like the patch from comment #5 is a go-er.  Sadly I didn't have FEATURES=test enabled (thought I did) but at least it builds now.  We can keyword it once we know it works.  Early reports though at this location seem promising.

>>> /usr/lib/libpython2.6.so -> libpython2.6.so.1.0
Switching to python2.6
 * Byte compiling python modules for python-2.6 .. ...                                    [ ok ]
>>> Regenerating /etc/ld.so.cache...

>>> Recording dev-lang/python in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
zhenghe python # python --version
Python 2.6.2
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-02 01:30:05 UTC
(In reply to comment #8)

When you definitely confirm that patch from comment #5 works, please inform us, and I will include this patch to python patchset.
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-22 16:40:02 UTC
Next versions of Portage will depend on >=dev-lang/python-2.6, so please quickly work on this bug.
Comment 11 Manuel Lauss 2009-09-23 09:50:52 UTC
The patch in comment #5 works fine for me!

~ # python --version
Python 2.6.2
~ # uname -a
Linux exm-mipslinux 2.6.31-exm1200-07085-g8daae10 #1 Tue Sep 22 10:35:20 CEST 2009 mips Au1250 V0.2 EXM32-AU1200 GNU/Linux
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-29 19:20:13 UTC
Python now uses external libffi, so this bug should be fixed in libffi.
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2009-09-29 20:20:20 UTC
mips haven't made any effort on keywording libffi, so don't expect me to do anything unless I hear from them first
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2009-10-04 17:19:37 UTC
Created attachment 206002 [details, diff]
Patch converted to =dev-libs/libffi-3.0.8.

Please test.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2009-10-04 17:22:02 UTC
And if it works, mips devs can apply it. The ebuild already runs eautoreconf, so just drop it in.
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2009-10-06 09:35:15 UTC
"AFAICT there's no reason to have separate MIPS_IRIX and MIPS_LINUX #defines.  We used to, but they were merged into MIPS a couple of years ago." was the response from libffi upstream, see libffi's homepage for libffi-discuss mailinglist. One of you have to explain the problem there... if there is even a problem, in order to get this fixed upstream.
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2009-10-19 12:24:45 UTC
What about?

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481628
Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2009-10-19 20:25:22 UTC
Closing. Alexxy tested libffi today, it works on mips without patches.