Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277985 - Add support for multilib/crosscompile of distutils using ebuilds
Summary: Add support for multilib/crosscompile of distutils using ebuilds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 216958
  Show dependency tree
 
Reported: 2009-07-15 20:18 UTC by Thomas Sachau
Modified: 2010-02-05 17:45 UTC (History)
1 user (show)

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


Attachments
patch for distutils.eclass to enable multilib/crosscompile support (distutils-enable-crosscompile.patch,769 bytes, text/plain)
2009-07-15 20:19 UTC, Thomas Sachau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Sachau gentoo-dev 2009-07-15 20:18:13 UTC
Since distutils seems to use something like "uname -m" to catch the current ARCH, distutils based ebuilds fail to build even with a e.g. x86 environment on amd64. The following patch does fix this problem.

In addition, a var has to be added to some profiles, for x86/32bit profiles, it is SETARCH_ARCH_x86="i686".
Comment 1 Thomas Sachau gentoo-dev 2009-07-15 20:19:04 UTC
Created attachment 198097 [details]
patch for distutils.eclass to enable multilib/crosscompile support
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-12-01 10:04:47 UTC
Is this patch still needed?
PYTHON() function is now used in distutils.eclass.
Comment 3 Thomas Sachau gentoo-dev 2009-12-04 20:26:50 UTC
The changes in python.eclass seem to have done the work, from my last tests after your changes, so i think, this one is fixed.
Comment 4 Martin Gysel (bearsh) 2010-02-05 16:19:32 UTC
I don't think this bug has been fixed. look for example at #301578 or #216958. there distutils tries to compile a python module with the host compiler instead of using the arch specific cross-compiler. the relevant env vars (CC, LDSHARED) don't seem to be defined. defining them solves the problem (see xcompile patch in #301578).
Can someone please reopen?
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-02-05 16:24:58 UTC
This bug is only for multilib-portage, not for cross-compilation.
Cross-compilation should be first implemented by upstream.
Comment 6 Thomas Sachau gentoo-dev 2010-02-05 17:45:03 UTC
(In reply to comment #4)
> I don't think this bug has been fixed. look for example at #301578 or #216958.
> there distutils tries to compile a python module with the host compiler instead
> of using the arch specific cross-compiler. the relevant env vars (CC, LDSHARED)
> don't seem to be defined. defining them solves the problem (see xcompile patch
> in #301578).
> Can someone please reopen?
> 

If the relevant env vars are not defined, this is an issue in the ebuild, not something, which the distutils eclass should handle.

In addition does portage-multilib export the most relevant env vars, so this is no issue for portage-multilib users (portage-multilib might be extended to support crosscompile in general, but dont expect it in the near future).