commit: 708460e50bca1d251a826bf74c00a3021ea76f10 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Mon Jan 23 22:30:37 2023 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Mon Jan 23 22:30:37 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=708460e5
dev-lang/python: Fix cross-compiling, particularly 3.11 Despite efforts to avoid needing the same version of Python installed on the build host, this was still required due to libpython.so not being found. Even when it was found, it was erroneously looking under /usr rather than ${S} for the Python modules. For some unknown reason, this caused 3.11 to fail. The easiest solution is to just build a static Python with no libpython.so. This also ensures modules are loaded from ${S}. Closes: https://bugs.gentoo.org/889874 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> dev-lang/python/python-3.10.9.ebuild | 3 +++ dev-lang/python/python-3.11.1.ebuild | 3 +++ dev-lang/python/python-3.12.0_alpha4.ebuild | 3 +++ dev-lang/python/python-3.8.16-r3.ebuild | 3 +++ dev-lang/python/python-3.9.16.ebuild | 3 +++ 5 files changed, 15 insertions(+) diff --git a/dev-lang/python/python-3.10.9.ebuild b/dev-lang/python/python-3.10.9.ebuild index 1b3700f2b2b9..390bba98511d 100644 --- a/dev-lang/python/python-3.10.9.ebuild +++ b/dev-lang/python/python-3.10.9.ebuild @@ -246,6 +246,9 @@ src_configure() { --libdir="${cbuild_libdir:2}" + # Avoid needing to load the right libpython.so. + --disable-shared + # As minimal as possible for the mini CBUILD Python # we build just for cross. --without-lto diff --git a/dev-lang/python/python-3.11.1.ebuild b/dev-lang/python/python-3.11.1.ebuild index f0e59a041105..5d2077e3f7c7 100644 --- a/dev-lang/python/python-3.11.1.ebuild +++ b/dev-lang/python/python-3.11.1.ebuild @@ -235,6 +235,9 @@ src_configure() { --libdir="${cbuild_libdir:2}" + # Avoid needing to load the right libpython.so. + --disable-shared + # As minimal as possible for the mini CBUILD Python # we build just for cross to satisfy --with-build-python. --without-lto diff --git a/dev-lang/python/python-3.12.0_alpha4.ebuild b/dev-lang/python/python-3.12.0_alpha4.ebuild index 93317e0a722a..e3431855d0e7 100644 --- a/dev-lang/python/python-3.12.0_alpha4.ebuild +++ b/dev-lang/python/python-3.12.0_alpha4.ebuild @@ -229,6 +229,9 @@ src_configure() { --libdir="${cbuild_libdir:2}" + # Avoid needing to load the right libpython.so. + --disable-shared + # As minimal as possible for the mini CBUILD Python # we build just for cross to satisfy --with-build-python. --without-lto diff --git a/dev-lang/python/python-3.8.16-r3.ebuild b/dev-lang/python/python-3.8.16-r3.ebuild index 848ce784881c..3032411863bc 100644 --- a/dev-lang/python/python-3.8.16-r3.ebuild +++ b/dev-lang/python/python-3.8.16-r3.ebuild @@ -203,6 +203,9 @@ src_configure() { --libdir="${cbuild_libdir:2}" + # Avoid needing to load the right libpython.so. + --disable-shared + # As minimal as possible for the mini CBUILD Python # we build just for cross. --without-lto diff --git a/dev-lang/python/python-3.9.16.ebuild b/dev-lang/python/python-3.9.16.ebuild index f6dbbd4312df..cb84012fc09b 100644 --- a/dev-lang/python/python-3.9.16.ebuild +++ b/dev-lang/python/python-3.9.16.ebuild @@ -240,6 +240,9 @@ src_configure() { --libdir="${cbuild_libdir:2}" + # Avoid needing to load the right libpython.so. + --disable-shared + # As minimal as possible for the mini CBUILD Python # we build just for cross. --without-lto