Upstream bug report, https://github.com/xbmc/xbmc/issues/16560 Patch by asavah, https://forum.kodi.tv/showthread.php?tid=349548 diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fb6bf5bed..52be5b649d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,7 +163,7 @@ find_package(JsonSchemaBuilder REQUIRED) core_optional_dep(${optional_deps}) core_require_dep(${required_deps}) -SET(PYTHON_VERSION 3.7) +SET(PYTHON_VERSION 3.8) if(ENABLE_MARIADBCLIENT AND NOT ENABLE_MARIADBCLIENT STREQUAL AUTO AND ENABLE_MYSQLCLIENT AND NOT ENABLE_MYSQLCLIENT STREQUAL AUTO) MESSAGE(FATAL_ERROR "You can not use MySql and MariaDB at the same time. Disable one by adding -DENABLE_MYSQLCLIENT=OFF or -DENABLE_MARIADBCLIENT=OFF.") diff --git a/xbmc/interfaces/python/PythonInvoker.cpp b/xbmc/interfaces/python/PythonInvoker.cpp index 4342e05dcd..660e82c254 100644 --- a/xbmc/interfaces/python/PythonInvoker.cpp +++ b/xbmc/interfaces/python/PythonInvoker.cpp @@ -8,6 +8,14 @@ // python.h should always be included first before any other includes #include +#if PY_VERSION_HEX >= 0x03080000 +# define Py_BUILD_CORE +# undef HAVE_STD_ATOMIC +/* for access to the fields of PyInterpreterState */ +# include "internal/pycore_pystate.h" +# undef Py_BUILD_CORE +# define HAVE_STD_ATOMIC +#endif #include #include