diff options
author | Aron Budea <aron.budea@collabora.com> | 2021-12-24 06:36:09 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-12-24 08:02:11 +0100 |
commit | fa9ab05d78bb398efa3c09148e9d6d717f6168d1 (patch) | |
tree | e69ec352553fb5a31830849c219eb28bb293bce9 /external | |
parent | 5fe088133442cc77e747ba5fc97ccafbb08f342d (diff) |
python3: fix build on Win 10
With Windows 11 SDK (10.0.22000.0).
Error message is:
fatal error RC1116: RC terminating after preprocessor errors
https://bugs.python.org/issue45220
Applied fixing patches to 3.8.
Change-Id: I0860b05fd963ea81b493a4b9df7f39db86598dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127395
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/python3/UnpackedTarball_python3.mk | 1 | ||||
-rw-r--r-- | external/python3/python-3.8-msvc-sdk.patch.1 | 173 |
2 files changed, 174 insertions, 0 deletions
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk index af514446fff2..31b6a166e6ae 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\ $(eval $(call gb_UnpackedTarball_add_patches,python3,\ external/python3/i100492-freebsd.patch.1 \ external/python3/python-3.3.0-darwin.patch.1 \ + external/python3/python-3.8-msvc-sdk.patch.1 \ external/python3/python-3.7.6-msvc-ssl.patch.1 \ external/python3/python-3.5.4-msvc-disable.patch.1 \ external/python3/ubsan.patch.0 \ diff --git a/external/python3/python-3.8-msvc-sdk.patch.1 b/external/python3/python-3.8-msvc-sdk.patch.1 new file mode 100644 index 000000000000..fabdbb53ea63 --- /dev/null +++ b/external/python3/python-3.8-msvc-sdk.patch.1 @@ -0,0 +1,173 @@ +diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc +index 92987af713..d21f9b6e9d 100644 +--- a/PC/pylauncher.rc ++++ b/PC/pylauncher.rc +@@ -4,7 +4,6 @@ + + // Include the manifest file that indicates we support all + // current versions of Windows. +-#include <winuser.h> + 1 RT_MANIFEST "python.manifest" + + #if defined(PY_ICON) +diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc +index e5924a42da..fc607e9784 100644 +--- a/PC/pyshellext.rc ++++ b/PC/pyshellext.rc +@@ -4,7 +4,6 @@ + + // Include the manifest file that indicates we support all + // current versions of Windows. +-#include <winuser.h> + 1 RT_MANIFEST "python.manifest" + + ///////////////////////////////////////////////////////////////////////////// +diff --git a/PC/python_exe.rc b/PC/python_exe.rc +index ae0b029b80..5eba89962b 100644 +--- a/PC/python_exe.rc ++++ b/PC/python_exe.rc +@@ -4,7 +4,6 @@ + + // Include the manifest file that indicates we support all + // current versions of Windows. +-#include <winuser.h> + 1 RT_MANIFEST "python.manifest" + + 1 ICON DISCARDABLE "icons\python.ico" +diff --git a/PC/python_nt.rc b/PC/python_nt.rc +index fac6105d8a..33cee42cb7 100644 +--- a/PC/python_nt.rc ++++ b/PC/python_nt.rc +@@ -4,7 +4,6 @@ + + // Include the manifest file that indicates we support all + // current versions of Windows. +-#include <winuser.h> + 2 RT_MANIFEST "python.manifest" + + // String Tables +diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc +index 88bf3592e1..562652be18 100644 +--- a/PC/pythonw_exe.rc ++++ b/PC/pythonw_exe.rc +@@ -4,7 +4,6 @@ + + // Include the manifest file that indicates we support all + // current versions of Windows. +-#include <winuser.h> + 1 RT_MANIFEST "python.manifest" + + 1 ICON DISCARDABLE "icons\pythonw.ico" +diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc +index 84bd87d9d5..d2c18f8add 100644 +--- a/PC/sqlite3.rc ++++ b/PC/sqlite3.rc +@@ -4,7 +4,6 @@ + + // Include the manifest file that indicates we support all + // current versions of Windows. +-#include <winuser.h> + 2 RT_MANIFEST "python.manifest" + + ///////////////////////////////////////////////////////////////////////////// +diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc +index d21f9b6e9d..ff7e71e0fd 100644 +--- a/PC/pylauncher.rc ++++ b/PC/pylauncher.rc +@@ -2,6 +2,11 @@ + + #include "python_ver_rc.h" + ++#ifndef RT_MANIFEST ++// bpo-45220: Cannot reliably #include RT_MANIFEST from ++// anywhere, so we hardcode it ++#define RT_MANIFEST 24 ++#endif + // Include the manifest file that indicates we support all + // current versions of Windows. + 1 RT_MANIFEST "python.manifest" +diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc +index fc607e9784..af797ce95d 100644 +--- a/PC/pyshellext.rc ++++ b/PC/pyshellext.rc +@@ -2,6 +2,12 @@ + + #include "python_ver_rc.h" + ++#ifndef RT_MANIFEST ++// bpo-45220: Cannot reliably #include RT_MANIFEST from ++// anywhere, so we hardcode it ++#define RT_MANIFEST 24 ++#endif ++ + // Include the manifest file that indicates we support all + // current versions of Windows. + 1 RT_MANIFEST "python.manifest" +diff --git a/PC/python_exe.rc b/PC/python_exe.rc +index 5eba89962b..c3d3bff019 100644 +--- a/PC/python_exe.rc ++++ b/PC/python_exe.rc +@@ -2,6 +2,12 @@ + + #include "python_ver_rc.h" + ++#ifndef RT_MANIFEST ++// bpo-45220: Cannot reliably #include RT_MANIFEST from ++// anywhere, so we hardcode it ++#define RT_MANIFEST 24 ++#endif ++ + // Include the manifest file that indicates we support all + // current versions of Windows. + 1 RT_MANIFEST "python.manifest" +diff --git a/PC/python_nt.rc b/PC/python_nt.rc +index 33cee42cb7..539362cdc2 100644 +--- a/PC/python_nt.rc ++++ b/PC/python_nt.rc +@@ -2,6 +2,12 @@ + + #include "python_ver_rc.h" + ++#ifndef RT_MANIFEST ++// bpo-45220: Cannot reliably #include RT_MANIFEST from ++// anywhere, so we hardcode it ++#define RT_MANIFEST 24 ++#endif ++ + // Include the manifest file that indicates we support all + // current versions of Windows. + 2 RT_MANIFEST "python.manifest" +diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc +index 562652be18..38570b74fa 100644 +--- a/PC/pythonw_exe.rc ++++ b/PC/pythonw_exe.rc +@@ -2,6 +2,12 @@ + + #include "python_ver_rc.h" + ++#ifndef RT_MANIFEST ++// bpo-45220: Cannot reliably #include RT_MANIFEST from ++// anywhere, so we hardcode it ++#define RT_MANIFEST 24 ++#endif ++ + // Include the manifest file that indicates we support all + // current versions of Windows. + 1 RT_MANIFEST "python.manifest" +diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc +index d2c18f8add..9ae2aa0f6f 100644 +--- a/PC/sqlite3.rc ++++ b/PC/sqlite3.rc +@@ -2,6 +2,12 @@ + + #include <winver.h> + ++#ifndef RT_MANIFEST ++// bpo-45220: Cannot reliably #include RT_MANIFEST from ++// anywhere, so we hardcode it ++#define RT_MANIFEST 24 ++#endif ++ + // Include the manifest file that indicates we support all + // current versions of Windows. + 2 RT_MANIFEST "python.manifest" |