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
Created attachment 781253 [details] emerge --info for crossdev environment
Created attachment 781256 [details] build log
Created attachment 781259 [details] config.log
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.
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.
Well, or BDEPEND on it + checking BROOT to see if we're build cross?
(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.
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!=/.
came here to report this. for now I'm using EXTRA_ECONF but hope you guys will come up with elegant solution soon
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(-)
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(+)