Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 847910 - dev-lang/python-3.11 needs '--with-build-python' in the configure stage to cross-compile
Summary: dev-lang/python-3.11 needs '--with-build-python' in the configure stage to cr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-05-28 12:41 UTC by Matt Jolly
Modified: 2022-11-06 18:58 UTC (History)
5 users (show)

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


Attachments
emerge --info for crossdev environment (aarch-emerge-info,4.92 KB, text/plain)
2022-05-28 12:41 UTC, Matt Jolly
Details
build log (build.log,5.38 KB, text/x-log)
2022-05-28 12:42 UTC, Matt Jolly
Details
config.log (config.log,20.04 KB, text/x-log)
2022-05-28 12:43 UTC, Matt Jolly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2022-05-28 12:41:09 UTC
While trying to emerge @system for a new crossdev environment, I found that dev-lang/python-3.11 requires a new flag in the configure stage `--with-build-python`, and a version of python on the host that matches the same minor version.

I was able to successfully emerge dev-lang/python-3.10.4_p1, so I'm assuming this is a change for >=3.11

There's some discussion of this flag on upstream's mailing list late last year:
https://mail.python.org/pipermail/python-bugs-list/2021-December.txt
Comment 1 Matt Jolly gentoo-dev 2022-05-28 12:41:35 UTC
Created attachment 781253 [details]
emerge --info for crossdev environment
Comment 2 Matt Jolly gentoo-dev 2022-05-28 12:42:26 UTC
Created attachment 781256 [details]
build log
Comment 3 Matt Jolly gentoo-dev 2022-05-28 12:43:34 UTC
Created attachment 781259 [details]
config.log
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-29 05:45:38 UTC
I suppose the EAPI 8 way of doing this would be to build the host executable in a temporary directory first, and then pass it to the actual build.
Comment 5 James Le Cuirot gentoo-dev 2022-05-29 10:37:18 UTC
That probably won't be pretty. It's times like this that I wish we'd kept the (admittedly badly-named) targetroot USE flag from EAPI 5-hdepend.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-29 11:40:11 UTC
Well, or BDEPEND on it + checking BROOT to see if we're build cross?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-29 11:41:05 UTC
(In reply to Michał Górny from comment #6)
> Well, or BDEPEND on it + checking BROOT to see if we're build cross?

Oh wait, wrong.  BDEPEND would break regular installs.
Comment 8 James Le Cuirot gentoo-dev 2022-05-29 11:52:46 UTC
Yeah, that was the point of the flag. The flag didn't check for cross, just for ROOT!=/ or something like that, although technically you should probably just base it around SYSROOT!=/.
Comment 9 Rahil Bhimjiani 2022-06-04 10:18:46 UTC
came here to report this. for now I'm using EXTRA_ECONF but hope you guys will come up with elegant solution soon
Comment 10 Larry the Git Cow gentoo-dev 2022-06-17 21:04:08 UTC
The bug has been closed via the following commit(s):

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

commit 72fc7c1bbcf983d4778811e5d68bfc8a85873a74
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-07 09:29:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-17 21:03:25 +0000

    dev-lang/python: use --with-build-python for cross builds for 3.11
    
    Tested with sparc64-unknown-linux-gnu.
    
    Closes: https://bugs.gentoo.org/847910
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/python/python-3.11.0_beta3.ebuild | 51 +++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)
Comment 11 Larry the Git Cow gentoo-dev 2022-10-11 17:53:45 UTC
The bug has been referenced in the following commit(s):

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

commit 29d2314810bd8e1de73df5c3ebe30c826281c253
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-11 14:18:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-11 17:53:26 +0000

    dev-lang/python: build CBUILD Python for cross in older versions
    
    See bug 864911 for details.
    
    Bug: https://bugs.gentoo.org/847910
    Closes: https://bugs.gentoo.org/864911
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/python/python-3.10.7.ebuild | 45 ++++++++++++++++++++++++++++++++++++
 dev-lang/python/python-3.8.14.ebuild | 45 ++++++++++++++++++++++++++++++++++++
 dev-lang/python/python-3.9.14.ebuild | 45 ++++++++++++++++++++++++++++++++++++
 3 files changed, 135 insertions(+)