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@gentoo.org>
This commit is contained in:
James Le Cuirot
2023-01-23 22:30:37 +00:00
parent 5fdc644d92
commit 708460e50b
5 changed files with 15 additions and 0 deletions
+3
View File
@@ -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
+3
View File
@@ -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
@@ -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
+3
View File
@@ -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
+3
View File
@@ -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