Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878211 - dev-lang/python-3.10.8: cross compilation failed in configure phase
Summary: dev-lang/python-3.10.8: cross compilation failed in configure phase
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-24 21:51 UTC by Kingsley
Modified: 2022-10-25 11:22 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,44.78 KB, text/x-log)
2022-10-24 21:51 UTC, Kingsley
Details
emerge-info.txt (emerge-info.txt,5.74 KB, text/plain)
2022-10-24 21:51 UTC, Kingsley
Details
emerge-pqv.txt (emerge-pqv.txt,332 bytes, text/plain)
2022-10-24 21:52 UTC, Kingsley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kingsley 2022-10-24 21:51:03 UTC
Created attachment 825297 [details]
build.log

Cross compiling from amd64 for arm. Problem occurs during configure phase during "building own python on CBUILD" part of ebuild.

Relevant error:
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-mfpu=vfp’

My CFLAGS in /usr/armv6j-hardfloat-linux-gnueabi/etc/portage/make.conf:
COMMON_FLAGS="-O2 -pipe -fomit-frame-pointer -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s"

The chost cflags seem to be passed to the cbuild compiler, resulting in the error.

Reverting https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29d2314810bd8e1de73df5c3ebe30c826281c253 (originally added to fix bug #847910 and bug #864911) seems to avoid the issue and results in a working python executable.

Thanks for maintaining.
Comment 1 Kingsley 2022-10-24 21:51:41 UTC
Created attachment 825299 [details]
emerge-info.txt
Comment 2 Kingsley 2022-10-24 21:52:21 UTC
Created attachment 825301 [details]
emerge-pqv.txt
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-24 22:05:21 UTC
Thanks, I'll sort it tomorrow.
Comment 4 Larry the Git Cow gentoo-dev 2022-10-25 11:06:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddbae51c4cfc2f579deb0294f82f20e0609c4353

commit ddbae51c4cfc2f579deb0294f82f20e0609c4353
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-25 11:05:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-25 11:05:53 +0000

    dev-lang/python: fix CFLAGS for cross-compilation
    
    My CFLAGS for sparc etc were the same (generic) as for CBUILD, so didn't
    notice before.
    
    Closes: https://bugs.gentoo.org/878211
    Fixes: 29d2314810bd8e1de73df5c3ebe30c826281c253
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/python/python-3.10.8.ebuild | 17 ++++++++++++-----
 dev-lang/python/python-3.11.0.ebuild | 17 ++++++++++++-----
 dev-lang/python/python-3.8.15.ebuild | 17 ++++++++++++-----
 dev-lang/python/python-3.9.15.ebuild | 12 ++++++++++++
 4 files changed, 48 insertions(+), 15 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-10-25 11:22:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28482b456cd9bbe9fff822ca6ef736540f029a9f

commit 28482b456cd9bbe9fff822ca6ef736540f029a9f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-25 11:21:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-25 11:21:01 +0000

    dev-lang/python: fix py3.9 CFLAGS too
    
    Bug: https://bugs.gentoo.org/878211
    Fixes: ddbae51c4cfc2f579deb0294f82f20e0609c4353
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/python/python-3.9.15.ebuild | 5 -----
 1 file changed, 5 deletions(-)