package/python3: fix install
PATCH 1/1 package/python3: fix install
Fixes the following failure in the install step of host-python3:
...
/usr/bin/install -c -m 644 pyconfig.h output/host/include/python3.12/pyconfig.h
[ERROR] _tkinter failed to import: output/build/host-python3-3.12.1/build/lib.linux-x86_64-3.12/_tkinter.cpython-312-x86_64-linux-gnu.so: undefined symbol: Tcl_AddErrorInfo The following modules are *disabled* in configure script:
_ctypes_test _testbuffer _testcapi
_testclinic _testimportmultiple _testinternalcapi
_testmultiphase _xxtestfuzz xxsubtype
Following modules built successfully but were removed because they could not be imported:
_tkinter
Checked 110 modules (31 built-in, 54 shared, 15 n/a on linux-x86_64, 9 disabled, 0 missing, 1 failed on import)
...
/usr/bin/install -c -m 644 ./Lib/types.py output/host/lib/python3.12
/usr/bin/install: cannot stat 'Modules/_tkinter.cpython-312-x86_64-linux-gnu.so': No such file or directory /usr/bin/install -c -m 644 ./Lib/typing.py output/host/lib/python3.12
make[3]: *** [Makefile:2068: sharedinstall] Error 1
...
---
Changes v1 -> v2:
Make the --disable-tk option automatically set py_cv_module__tkinter=n/a (suggested by Thomas Petazzoni)
--- .../python3/0012-Add-an-option-to-disable-the-tk-module.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/python3/0012-Add-an-option-to-disable-the-tk-module.patch +3 -1
@@ -62,7 +62,7 @@ diff --git a/configure.ac b/configure.ac index c8ae60aa6b5..7caa361138d 100644 --- a/configure.ac +++ b/configure.ac -@@ -4503,6 +4503,11 @@ AC_ARG_ENABLE(pydoc, +@@ -4503,6 +4503,13 @@ AC_ARG_ENABLE(pydoc, AS_HELP_STRING([--disable-pydoc], [disable pydoc]), [ PYDOC="${enableval}" ], [ PYDOC=yes ])
@@ -70,6 +70,8 @@ index c8ae60aa6b5..7caa361138d 100644 +AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), + [ TK="${enableval}" ], [ TK=yes ]) ++AS_IF([test "$TK" = "no"], ++ [PY_STDLIB_MOD_SET_NA([_tkinter])]) + # Check for enable-ipv6 AH_TEMPLATE([ENABLE_IPV6], [Define if --enable-ipv6 is specified])
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 20 lines · On Thu, 8 Feb 2024 10:56:14 +0100 Roy Kollen Svendsen…
Fixes the following failure in the install step of host-python3:
...
/usr/bin/install-c -m 644pyconfig.houtput/host/include/python3.12/pyconfig.h
[ERROR]_tkinterfailed to import: output/build/host-python3-3.12.1/build/lib.linux-x86_64-3.12/_tkinter.cpython-312-x86_64-linux-gnu.so: undefined symbol:Tcl_AddErrorInfoThe following modules are *disabled* in configure script:
_ctypes_test_testbuffer_testcapi
_testclinic_testimportmultiple_testinternalcapi
_testmultiphase_xxtestfuzzxxsubtypeFollowing modules built successfully but were removed because they could not be imported:
_tkinterChecked 110 modules (31 built-in, 54 shared, 15 n/a on linux-x86_64, 9 disabled, 0 missing, 1 failed on import)
...
/usr/bin/install-c -m 644./Lib/types.pyoutput/host/lib/python3.12
/usr/bin/install: cannot stat 'Modules/_tkinter.cpython-312-x86_64-linux-gnu.so': No such file or directory/usr/bin/install-c -m 644./Lib/typing.pyoutput/host/lib/python3.12
make[3]: *** [Makefile:2068: sharedinstall] Error 1
...
Quoted 7 lines
Signed-off-by Roy Kollen Svendsen <[email protected]>---
Changes v1 -> v2:
Make the --disable-tk option automatically set py_cv_module__tkinter=n/a (suggested by Thomas Petazzoni)--- .../python3/0012-Add-an-option-to-disable-the-tk-module.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Applied to master after improving the commit title, and extending the commit log to indicate which commit this is fixing.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot