summaryrefslogtreecommitdiff
path: root/external/python3
AgeCommit message (Collapse)Author
2024-06-12Fix --disable-runtime-optimizations buildStephan Bergmann
...after 19e9e49bdaeebc314c892c000385ec778edf759b "python3: upgrade to 3.9.19", by making external/python3/python-3.3.3-disable-obmalloc.patch.0 apply again Change-Id: I295e470f3e86740ee276336dd04c227b2b316140 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168695 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-06-11python3: upgrade to 3.9.19Xisco Fauli
Downloaded from https://www.python.org/ftp/python/3.9.19/Python-3.9.19.tar.xz * python-3.8-msvc-sdk.patch.1 is no longer needed * Comment out deprecated warnings for now: C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/pyuno/source/module/pyuno_util.cxx(42): error C2220: the following warning is treated as an error C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/pyuno/source/module/pyuno_util.cxx(42): warning C4996: 'PyUnicode_FromUnicode': deprecated in 3.3 C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/pyuno/source/module/pyuno_util.cxx(64): warning C4996: 'PyUnicode_AsUnicode': deprecated in 3.3 Change-Id: Iaa358ffaaea63cf6ec47914759d0469e70e1cc65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168551 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-05-06makefile simplification: replace $(call gb_UnpackedTarball_get_dir,foo)Christian Lohmaier
…by a simple/static $(gb_UnpackedTarball_workdir)/foo see also 0c4c84a14b01c71c76a9c45a7f26aec4d64f3e4f Change-Id: I8e6aa55c85534c4446556548910c950ddbe7c6fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167163 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2024-04-24use --binary flag when applying patches with patch from git-bashChristian Lohmaier
Change-Id: Idbd4ad7ad89dc727e2f0cf851c4c62f05d5b2a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166328 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-03-28python exits on initialization if fd 0 is a dirCaolán McNamara
which can happen if stdin was closed and the next open was of a dir. Later python checks for is_valid_fd, but an invalid fd is not fatal for stdin, etc and it just return an empty stdin wrapper, so move this check lower and do the same for a dir. Change-Id: Iaf8a48927b49408577ae7a781dfc6e0255a940cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165327 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-09python3: name gdb pretty-printer after .so, not .binMichael Stahl
So it works not only with instdir/program/python but also with soffice in-process python. Change-Id: I5c3643ef4a7ca0f25df3c6f51d11ff98c27f4bd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159148 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-22Replace a tab with spacesTaichi Haradaguchi
Change-Id: I06805f3c07b5baedfd492d701cb6f46da5ea913f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158322 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-10-15Typo: Unfortuantely->Unfortunately (python3/ExternalProject_python3.mk)Julien Nabet
Change-Id: I80d316c76196d8cdda4b2ad509d2d1b53b5c414a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157991 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2023-10-14Upgrade libffi to 3.4.4Taichi Haradaguchi
Change-Id: I417abc5d76db235c23195abff22d3d27f9c0fa77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157972 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-10-14tdf#116412 include bz2 module in internal pythonTaichi Haradaguchi
This commit includes the changes in 5e3510dbb62229cfb01da371d39ecc27b0d44880 and 219bef04b7084eef49e1001312e186f390f4f735, as well as the following changes: * add bzip2 as permissable build target when cross compiling for Windows ARM64. * add external/bzip2/disable-test.patch.0 for cross-compiling. * revert the changes to configure.ac in 5e3510dbb62229cfb01da371d39ecc27b0d44880. * change the argument of gb_UnpackedTarball_fix_end_of_line. Change-Id: Iad8b1ed48d6c56e1302d9ac11620dc8084e79276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157101 Tested-by: Taichi Haradaguchi <20001722@ymail.ne.jp> Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-10-10fix internal python build on aarch64-unknown-linux-gnuAndras Timar
Change-Id: I74189af9edd8384cbb1d65a805a29cea91646eeb (cherry picked from commit 77ebb08e5f93ea9b9e82ddc3de0698babe0630a8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157752 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-15A more principled suppression of -fsanitize=function in external C codeStephan Bergmann
...after <https://github.com/llvm/llvm-project/commit/279a4d0d67c874e80c171666822f2fabdd6fa926> "-fsanitize=function: support C". This includes reverts of 16af9e81863a80116f808ee3cfa4a1bab7c67ac5 "update clang asan suppressions" and 151a43f3d00f6523079c53d6c2d064f80b9a55d6 ""update clang asan suppressions". Change-Id: I49740f5f3a784af1d62b830b47bfdfa27fe3e471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156935 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-07Revert "tdf#116412: include bz2 in internal python"Taichi Haradaguchi
This reverts commit 5e3510dbb62229cfb01da371d39ecc27b0d44880. Reason for revert: occured build error at https://ci.libreoffice.org/view/tb%20platform%20status/job/lo_daily_tb_win_arm64/966/ Change-Id: I9f9087964f7a85c03bca6be4eff5717d6d274c89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155391 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-08-06Revert "external/python3: fix Windows build"Taichi Haradaguchi
This reverts commit 219bef04b7084eef49e1001312e186f390f4f735. Reason for revert: occured build error at https://ci.libreoffice.org/view/tb%20platform%20status/job/lo_daily_tb_win_arm64/972/ Change-Id: I26bb1a790ffddd7cb2f102f09cfb46b9327bb94b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155309 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-08-06external/python3: fix Windows buildTaichi Haradaguchi
...after commit 5e3510dbb62229cfb01da371d39ecc27b0d44880 (tdf#116412: include bz2 in internal python) add _bz2*.pyd modules. Change-Id: Icae5971fd766af738287d34f7abc4187a7a1fcca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155367 Tested-by: Taichi Haradaguchi <20001722@ymail.ne.jp> Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-07-30tdf#116412: include bz2 in internal pythonTaichi Haradaguchi
Change-Id: Ie257446692227ae689fad2e61a42405a68e4f665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139580 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-06-07python3: upgrade to release 3.8.17Michael Stahl
Fixes CVE-2023-24329 and a few more obscure security issues. Change-Id: I4b073ce02c0377e2791e4593d20f2b756de0c8cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152696 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-09fix internal python build on powerpc64le-unknown-linux-gnuAndras Timar
Change-Id: I49c1368542a1af5dbbf377dbd8cb0cad8c6e2a38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135174 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146689 Tested-by: Jenkins
2023-01-27Remove support for AIXStephan Bergmann
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-16external/python3: fix line offsets in internal-zlib.patch.0Taichi Haradaguchi
"@@ -11607,13 +11607,13 @@" -> "@@ -12333,13 +12333,13 @@" Change-Id: I03542ad3171814f6869bccab4dde77673eaa90f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144982 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-11-21macOS (janitor): remove workarounds for no longer supported SDKsChristian Lohmaier
since we won't accept anything lower than 10.14 on master (and 10.13 on libreoffice-7-4 branch), we don't need those quirks anymore. Change-Id: Ibc71a2ce7a0dc60769d03d477991b48fc99d534d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143040 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-10-24Python3: update to 3.8.15Taichi Haradaguchi
* Fixes CVE-2022-40674 * Removed 0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 as fixed upstream Change-Id: I8e71f9a6b013ca4c45bf8774b284be98eee71bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-10upgrade to openssl-3.0.5Caolán McNamara
patch out using IPC::Cmd instead of requiring adding it to build-time dependencies for mysterious: The system cannot find the path specified. NMAKE : fatal error U1077: '""C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x86\cl.exe' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86\nmake.exe"' : return code '0x2' Stop. include fix from https://github.com/openssl/openssl/issues/18823 and for move /Y crypto/aes/aes-586.asm.i crypto/aes/aes-586.asm The system cannot find the path specified. NMAKE : fatal error U1077: 'move' : return code '0x1' add own patch to use mv and rm for move and del Change-Id: I071750e20efd0931ea1c5c3b49e7a5173c7283f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139641 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-07Remove obsolete commentStephan Bergmann
...after c8fd50f9ec02a131fd4c99e80f7252b49015653a "python3: upgrade to release 3.8.13" Change-Id: I43428485e7cdffec7b3a7a575334bd886e2f26c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139609 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-07python3: upgrade to release 3.8.13Taichi Haradaguchi
Remove some code in external/python3/darwin.patch.0 as it was fixed upstream(https://bugs.python.org/issue45405). Change-Id: Ie6bfb2456f96a63adbf0dbcb9c902dc56f1151ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139493 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-04external/python3: Avoid "ThreadSanitizer: destroy of a locked mutex"Stephan Bergmann
..when building ExternalProject_python3 with Clang -fsanitize=thread, > WARNING: ThreadSanitizer: destroy of a locked mutex (pid=973799) > #0 in AnnotateRWLockDestroy at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp:184:3 (workdir/UnpackedTarball/python3/python +0x498460) > #1 in recreate_gil at workdir/UnpackedTarball/python3/Python/ceval_gil.h:138:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xe84aa9) > #2 in _PyEval_ReInitThreads at workdir/UnpackedTarball/python3/Python/ceval.c:350:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xe847c7) > #3 in PyOS_AfterFork_Child at workdir/UnpackedTarball/python3/./Modules/posixmodule.c:469:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x1163dbd) > #4 in os_fork_impl at workdir/UnpackedTarball/python3/./Modules/posixmodule.c:6253:9 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x11adcad) > #5 in os_fork at workdir/UnpackedTarball/python3/./Modules/clinic/posixmodule.c.h:2750:12 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x117b481) > #6 in cfunction_vectorcall_NOARGS at workdir/UnpackedTarball/python3/Objects/methodobject.c:463:24 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x9db7e1) > #7 in _PyObject_Vectorcall at workdir/UnpackedTarball/python3/./Include/cpython/abstract.h:127:11 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xf0225e) > #8 in call_function at workdir/UnpackedTarball/python3/Python/ceval.c:4963:13 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xef3f4a) > #9 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:3469:23 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0xedc5d8) [...] > #143 in pymain_run_python at workdir/UnpackedTarball/python3/Modules/main.c:610:21 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x1149f6c) > #144 in Py_RunMain at workdir/UnpackedTarball/python3/Modules/main.c:689:5 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x11495e9) > #145 in pymain_main at workdir/UnpackedTarball/python3/Modules/main.c:719:12 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x114a299) > #146 in Py_BytesMain at workdir/UnpackedTarball/python3/Modules/main.c:743:12 (workdir/UnpackedTarball/python3/libpython3.8d.so.1.0 +0x114a30d) > #147 in main at workdir/UnpackedTarball/python3/./Programs/python.c:16:12 (workdir/UnpackedTarball/python3/python +0x4d00f8) Assuming that the GIL is always locked before the fork, better tell TSan about a fake RELEASED before telling it about a fake DESTROY, to keep TSan's model consistent. Change-Id: I6c68d7e415aa0ffc3047e5a5c4c4aca6b0cce8cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130985 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-23external/python3: Explicitly check that all extension modules got builtStephan Bergmann
...to avoid issues like we now experienced on Jenkins box tb76, where e.g. <https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/108402/> failed with just an unhelpful > /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/external/python3/ExternalPackage_python3.mk:46: *** file /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/python3/LO_lib/_elementtree.cpython-3.8d.so does not exist in the tarball. Stop. > make[1]: *** Waiting for unfinished jobs.... > Makefile:299: recipe for target 'build' failed > make: *** [build] Error 2 after ExternalProject_python3 had been built successfully, outputting just > [build PRJ] python3 even though its workdir/UnpackedTarball/python3/build.log states > *** WARNING: renaming "_elementtree" since importing it failed: pyexpat version is incompatible and > Following modules built successfully but were removed because they could not be imported: > _elementtree (but which got hidden by gbuild) Change-Id: I28904ef41cb823e308bb8e15cbe969872702cb55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130355 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-31externals: always provide platform configure flagsJan-Marek Glogowski
No idea why we just provided the platform flags when cross- compiling. In the curious case, where the host platform is detected as x86_64-pc-mingw32 per default and we actually want to override it with x86_64-pc-cygwin, we don't do a cross compile, but must override the host platform. But there is additional special handling needed for the omitted cross-platform build in the special case of --host=i686-pc-cygwin and --build=x86_64-pc-cygwin, where we deliberatly ignore cross building; Windows is already a slow build, so try to keep this optimization (AMD64 can execute x86 binaries). There is the theoretical case, where the externals config.guess would have detected something else and that "magically" even worked, while the LO detected triplet would fail, but this should be fixed in the external in any way. Change-Id: Ib7a9719e0e406fe90334b7611dc3f01b51692bfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129153 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24python3: fix build on Win 10Aron Budea
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>
2021-10-08Centralize VS-to-toolset mapping in configureMike Kaganski
This allows to define the mapping once, and avoid modification in multiple places each time a new VS version support is added Change-Id: I93de4c9d78c3f67a0a2e157007e9d13b6f557937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123163 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-16Add preliminary VS 2022 supportHossein
This patch changes the configure.ac, so that LibreOffice compiles with the latest VS 2022 preview. The option --with-visual-studio=2022 should be added to the autogen.input, in order to use VS 2022 preview. Change-Id: Ia1d9bbeabbbd44ffe82af3624151b69d36c0a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122133 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-20Make some scripts more portableIlmari Lauhakangas
Change-Id: Ia89059eea51ca396a7c74143625ac9a6706de198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120773 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-06-25python3: update to 3.8.10Jan-Marek Glogowski
So we don't build 3.8.8rc1 anymore. I didn't look into 3.9. Change-Id: Ife7d898c913b9b164168b0ef23a055deea55815f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117757 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-07external/python3: Mark configure part of darwin.patch.0 as reported upstreamStephan Bergmann
Change-Id: Ibf9fb088eb1d7e11582518aeafa233dfa7c56bf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115223 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-07external/python3: Clang 13 trunk implements --print-multiarch nowStephan Bergmann
...since <https://github.com/llvm/llvm-project/commit/a921d2d2fb46b898794091e7410426c518a4f0cc> "[Driver] Add -print-multiarch", which causes an issue when building ExternalProject_python3 on macOS: > checking build system type... x86_64-apple-darwin19.6.0 > checking host system type... x86_64-apple-darwin19.6.0 [...] > checking for the platform triplet based on compiler characteristics... darwin configure: error: internal configure error for the platform triplet, please file a bug report > make[1]: *** [/Users/stephan/Software/lo/core/external/python3/ExternalProject_python3.mk:80: /Users/stephan/Software/lo/core/workdir/ExternalProject/python3/build] Error 1 as workdir/UnpackedTarball/python3/configure.ac computes PLATFORM_TRIPLET as "darwin", and instead of computing MULTIARCH as empty (as `$CC --print-multiarch` used to just print > clang: error: unsupported option '--print-multiarch' > clang: error: no input files to stderr), it now computes it as e.g. "x86_64-apple-darwin19.6.0" (or whatever -target is explicitly set to in $CC), so the check that they have equal values if they are bot nonempty fails now when building against Clang 13 trunk. (This is not yet an issue with any Apple Clang version, though.) Until this is eventually fixed upstream at <https://github.com/python/cpython>, just keep pretending that `clang --print-multiarch` would cause no stdout output on macOS when determining MULTIARCH. Change-Id: Ic1b27c6791b327d5709a9d61a6d675c3fa8989bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-07external/python3: First removeunnecessarystuff, then fixinstallnamesStephan Bergmann
otherwise, we could get issues like > error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_curses_panel.cpython-3.8.so (No such file or directory) > error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_curses.cpython-3.8.so (No such file or directory) > error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_testinternalcapi.cpython-3.8.so (No such file or directory) > error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Users/stephan/Software/lo/core/workdir/UnpackedTarball/python3/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/3.8/lib/python3.8/lib-dynload/_dbm.cpython-3.8.so (No such file or directory) when the two jobs run in parallel Change-Id: I6db18d7a6fa0ce177e88f8f714434acf9afe3ea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115218 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-05WASM: add initial support for Emscripten cross buildJan-Marek Glogowski
- configure with: - --host=wasm64-local-emscripten - had to make a few externals optional, so adding: - --disable-nss - --disable-cmis - --disable-curl Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-05-05Switch OPENSSL config var from negative to positiveJan-Marek Glogowski
- align with most of the rest of config_host - rename DISABLE_OPENSSL to ENABLE_OPENSSL - make this configurable Change-Id: Ic3b41fcdda38db66134939f12265e0da24833d60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114564 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-04-21Python .so files names have changed on macOS at least for some reasonTor Lillqvist
There is no longer any "m" in the name suffix. Adapt the names of the ones we want to remove for macOS. The idlelib and tkinter dylibs are no longer there at all. Don't use the -f flag to the rm commands. Thus we will notice the next time something we want to remove isn't actually there or has been renamed. But sadly for some unknown reason we do need to use a * wildcard in the .so names. Fixes a problem caught by App Store review where the Python curses module had not been removed as it should have been. (It uses non-public APIs and can thus not be included.) Change-Id: I51b9728cc9ca0a962908d3994e3a0ff8e4fa7f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114372 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-03-23Rename LO Windows arm64 ID to aarch64Jan-Marek Glogowski
The Windows platform is called Arm64. But now that the ID for Mac is also going to be renamed from arm64 to aarch64, this get's rid of the arm64 as the UNO identifier and user in gbuild, just like on all other Arm64 platforms. Change-Id: I60a7eafd04b426f17b6e41ad9a09e6405c0d4173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112973 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-01-18mac: don't put script files into Contents/MacOS or framework-bin directoryChristian Lohmaier
Signing them as executable code would require external attributes, and those in turn break packaging into hfs+ dmg when building on apfs with Big Sur. It is not a new thing - the old Code Signing in Depth technote https://developer.apple.com/library/archive/technotes/tn2206/_index.html already reads: "Store Python, Perl, shell, and other script files and other non-Mach-O executables in your app's Contents/Resources directory. While it's possible to sign such executables and store them in Contents/MacOS, this is not recommended. […] Put another way, a properly-signed app that has all of its files in the correct places will not contain any signatures stored as extended attributes." The patch does exactly that for LO and the shipped python framework and adds symlinks for the moved files. Same applies for the Language pack applescript and the tarball - those are also moved into Contents/Resources Change-Id: Iab21e77b73f941248ca89c6e80703fdf67a1057c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109537 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-01-02Fix build error in Python3 for Raspberry pi4bJulien Nabet
/home/pi/lo/libreoffice/external/python3/ExternalPackage_python3.mk:48: *** file /home/pi/lo/libreoffice/workdir/UnpackedTarball/python3/LO_lib/_sysconfigdata__linux_armv7l-unknown-linux-gnueabihf.py does not exist in the tarball. Arrêt. Change-Id: If348c9f55883c1afcc37ff38e84361786bef1845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108595 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-12-03Drop Python modules we don't want on macOS, too, like on other platformsTor Lillqvist
On macOS, for various reasons, we use a different approach than on other platforms to construct the bundled Python. Instead of explicitly listing what to include (out of what Python contains and builds) (in ExternalPackage_python3.mk), after Python is built, we remove stuff we don't want (in ExternalProject_python3.mk) and then include everything left in the LibreOfficePython.framework (in GeneratedPackage_python3.mk). This fixes a problem in App Store review: For some reason the review said that the setcchar() function from the ncurses library, used by Python's curses module, is non-public. No idea why the (automated) review picked on that function. As far as I see from the ncurses header in the SDK, that function is no less public than the other ncurses functions that the Python module uses. But oh well, we don't actually ship the curses module anyway on other platforms, so just drop it on macOS, too. And while at it, drop the other unwanted ones, too. And any binary shared libraries for them. Change-Id: Idecaf10a6fb1c59e8711095927f5699b8d2ec98e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107055 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107141 Tested-by: Tor Lillqvist <tml@collabora.com>
2020-12-02Guard against sysconf(_SC_OPEN_MAX) returning LONG_MAXTor Lillqvist
That seems to happen in a sandboxed process on macOS, at least. This caused an apparent hang when invoking Python, for instance simply through Tools > Macros > Run Macro... . Change-Id: I6bc055b44f298251ed596084538b98442c215fce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107013 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-12-02external/python3: Silence UBSan errors with --with-pydebugStephan Bergmann
...that happen when building ExternalProject_python3 itself after 12142490cd43f8568ab29e0ddfa75b334d6d39d5 "Enable Python Py_DEBUG setting when built with --enable-dbgutil on Linux": For one, silence > Modules/posixmodule.c:14395:9: runtime error: left shift of 34 by 26 places cannot be represented in type 'int' > #0 in all_ins at workdir/UnpackedTarball/python3/./Modules/posixmodule.c:14395:9 where at least my kernel-headers-5.9.9-200.fc33.x86_64 /usr/include/linux/memfd.h has > #define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB and /usr/include/asm-generic/hugetlb_encode.h has > #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) For another (and as predicted in 29d47d22c43e6adc1850b7db5880028dcd07d1b3 "Fix passing --disable-optimized into external/python3": "in a Linux UBsan build, making ExternalProject_python3 would have started to cause some 'applying zero offset to null pointer' failures, but which would have been easy to fix"), silence > Objects/listobject.c:551:24: runtime error: applying zero offset to null pointer > #0 in list_concat at workdir/UnpackedTarball/python3/Objects/listobject.c:551:24 Change-Id: I0523cd35e393000c8e67629a0522b2db1d8c16f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106984 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-01Enable Python Py_DEBUG setting when built with --enable-dbgutil on LinuxThomas Viehmann
This has been suggested on IRC for testing fixes/avoiding regressions when working on the GIL locking in PyUNO. Change-Id: Ifda21a867b3c0c7db636a9ec950050012e4742de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106791 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-11-19Add comment on how to run Python's own unit testsTor Lillqvist
Change-Id: Id62a688d2ddf7493d419a00a9fd0dfc6a6f13f0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106173 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-11-15Make one more thing in Python compile for macOS on arm64Tor Lillqvist
Change-Id: I6716048f0b58eb502b9d1ade8a13b8e33e4aaf2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105905 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-11-15Make python3 build on macOS 11, including for arm64Tor Lillqvist
There is no /usr/lib/libz.dylib any longer in macOS 11. No idea whether it works (especially on arm64), but that is another issue. Change-Id: I92ac0c500388730eca0be4766f07b1af2d2808e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105897 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-09-17python3: fix Windows Arm64 buildJan-Marek Glogowski
Change-Id: I2e9f9ca5fcf40a3ff53c036ebc51a75b882d91f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102854 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>