Commit Graph
173 Commits
Author SHA1 Message Date
Christian Lohmaier 657efd649f macOS: simplify mac exclusion recipes
on branches 25-2 and 24-8 the python tkinter dylib is back.
The corresponding python module is ignored already, and the tkinter
cpython dylib already was removed in the past, but apparently at some
point that file wasn't generated anymore and the corresponding line to
delete it was removed in 6e62c9df96
That same commit also changed the filenames to use a * wildcard after
the python version, apparently to account for a "d" suffix in the
--enable-dbgutil case. In the spirit of the old commit to avoid rm -f
and to be explicit and catch potential other issues in future remove
that wildcard again/replace the suffix with a macro that contains the
appropriate suffix already as used in ExternalPackage_python3.mk.

Change-Id: I22b49af7dbf9a0bed5c124d9f137b8a38fee7471
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180705
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-01-27 13:37:45 +01:00
Xisco Fauli 47e110fc66 tdf#162786, tdf#161947: Add support for setuptools and pip
For that, just unzip the wheel files to the Lib directory

Change-Id: I3998e427aeadb840b626ebbb6ce91938de47d2b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180271
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-01-21 22:05:50 +01:00
Stephan Bergmann 590157ac15 external/python: Don't package an _lzma library
...to avoid

> [build CHK] CustomTarget/postprocess/check_dynamic_objects/check.done
> instdir/program/python-core-3.11.11/lib/lib-dynload/_lzma.cpython-3.11d.so has suspicious NEEDED: liblzma.so.5

as seen at least when building on a Fedora 41 machine that happens to have
xz-devel-5.6.2-2.fc41.x86_64 installed (so that Python's configure detects
have_liblzma=yes).

The _lzma library had been added to external/python3/ExternalPackage_python3.mk
in 892c0d2ef0 "python3: update
python3_EXTENSION_MODULES", but without giving any rationale.  (It had
previously been removed there with c2e4e74138
"Python3.5: Remove external dependencies: readline and lzma".)

Change-Id: I4afe9fb08891dda116f115dac7b2f948aac84e06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180194
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-13 23:20:11 +01:00
Xisco Fauli c9ae567c79 python3: get python.exe from extern
Instead of downloading nuget.exe and then python.exe
as explained in https://lists.freedesktop.org/archives/libreoffice/2025-January/092881.html,
Add python.3.12.8.nupkg to extern and download it as a tarball
to unzip it in external/pythonx86.
find_python.bat will look for python.exe in external/pythonx86/tools

Downloaded from
https://globalcdn.nuget.org/packages/python.3.12.8.nupkg?packageVersion=3.12.8

Change-Id: Ib1638fa66b3983048c2f9a472d00ce365602fcbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180078
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-01-10 23:18:29 +01:00
Xisco Fauli 209bb3388a python3: fix win arm build
removed by mistake in
commit 50524481b3
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Tue Dec 17 17:25:59 2024 +0100

    Python: upgrade to 3.11.11 (master only)

Change-Id: Ib1f79713e81238fd5c26cbbaf87e260a0a7e4f41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180032
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-01-10 08:31:22 +01:00
Stephan Bergmann e87fdbb86d external/python3: Avoid misaligned-pointer-use
...when generating Python/deepfreeze/deepfreeze.c during the build of
ExternalProject_python3 after 50524481b3 "Python:
upgrade to 3.11.11 (master only)",

> Objects/dictobject.c:1500:40: runtime error: load of misaligned address 0x555853494d81 for type 'PyDictUnicodeEntry *', which requires 8 byte alignment
> 0x555853494d81: note: pointer points here
>  00 00 00  ff ff ff ff ff ff ff ff  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00
>               ^
>  #0 in dictresize at workdir/UnpackedTarball/python3/Objects/dictobject.c:1500:21
>  #1 in dict_merge at workdir/UnpackedTarball/python3/Objects/dictobject.c:2880:17
>  #2 in _PyDict_MergeEx at workdir/UnpackedTarball/python3/Objects/dictobject.c:3003:12
>  #3 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:3432:17
>  #4 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16
>  #5 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24
>  #6 in _PyFunction_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:393:16
>  #7 in _PyObject_FastCallDictTstate at workdir/UnpackedTarball/python3/Objects/call.c:141:15
>  #8 in _PyObject_Call_Prepend at workdir/UnpackedTarball/python3/Objects/call.c:482:24
>  #9 in slot_tp_init at workdir/UnpackedTarball/python3/Objects/typeobject.c:7855:15
>  #10 in type_call at workdir/UnpackedTarball/python3/Objects/typeobject.c:1103:19
>  #11 in _PyObject_MakeTpCall at workdir/UnpackedTarball/python3/Objects/call.c:214:18
>  #12 in _PyObject_VectorcallTstate at workdir/UnpackedTarball/python3/./Include/internal/pycore_call.h:90:16
>  #13 in PyObject_Vectorcall at workdir/UnpackedTarball/python3/Objects/call.c:299:12
>  #14 in _PyEval_EvalFrameDefault at workdir/UnpackedTarball/python3/Python/ceval.c:4769:23
>  #15 in _PyEval_EvalFrame at workdir/UnpackedTarball/python3/./Include/internal/pycore_ceval.h:73:16
>  #16 in _PyEval_Vector at workdir/UnpackedTarball/python3/Python/ceval.c:6434:24
>  #17 in PyEval_EvalCode at workdir/UnpackedTarball/python3/Python/ceval.c:1148:21
>  #18 in run_eval_code_obj at workdir/UnpackedTarball/python3/Python/pythonrun.c:1741:9
>  #19 in run_mod at workdir/UnpackedTarball/python3/Python/pythonrun.c:1762:19
>  #20 in pyrun_file at workdir/UnpackedTarball/python3/Python/pythonrun.c:1657:15
>  #21 in _PyRun_SimpleFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:440:13
>  #22 in _PyRun_AnyFileObject at workdir/UnpackedTarball/python3/Python/pythonrun.c:79:15
>  #23 in pymain_run_file_obj at workdir/UnpackedTarball/python3/Modules/main.c:360:15
>  #24 in pymain_run_file at workdir/UnpackedTarball/python3/Modules/main.c:379:15
>  #25 in pymain_run_python at workdir/UnpackedTarball/python3/Modules/main.c:605:21
>  #26 in Py_RunMain at workdir/UnpackedTarball/python3/Modules/main.c:684:5
>  #27 in main at workdir/UnpackedTarball/python3/Programs/_bootstrap_python.c:109:12

Change-Id: I0bacef11b5874bca6104516a206076a0505528ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180037
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-10 08:05:41 +01:00
Xisco Fauli 50524481b3 Python: upgrade to 3.11.11 (master only)
Downloaded from https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tar.xz

* Add external/python3/replace-powershell-with-wget.patch.1
to avoid

FindPythonForBuild:
 Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure
 channel.
 At line:1 char:1
 + Invoke-WebRequest https://aka.ms/nugetclidl -OutFile
 'C:\cygwin64\home\tdf\jenki ...
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~
     + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
    pWebRequest) [Invoke-WebRequest], WebException
     + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
    ll.Commands.InvokeWebRequestCommand

 'py' is not recognized as an internal or external command,
 operable program or batch file.

when downloading nuget.exe from https://aka.ms/nugetclidl
using powershell. By default powershell uses TLS 1.0 and the site security requires TLS 1.2,
so it fails with 'The request was aborted: Could not create SSL/TLS
secure channel.'

Kudos to Caolán for helping with a compiling issue.
See https://lists.freedesktop.org/archives/libreoffice/2024-December/092830.html

Change-Id: If66a88dd8f8c7774c49f8c33e9e40d2d5418e7c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178681
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-09 15:42:20 +01:00
Xisco Fauli 892c0d2ef0 python3: update python3_EXTENSION_MODULES
Change-Id: Ia636690f0dd9497e62ac9fd7a1ed4d00e71cc299
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179896
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-01-08 10:56:32 +01:00
Xisco Fauli 02363a5cf5 related tdf#143980: python3: add ensurepip
Change-Id: Ia38a81cbcd14776b7fa1398856bd3f8997a869ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178741
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-12-18 22:31:04 +01:00
Xisco Fauli 860e4b044a related tdf#162798: add script to create the list of external packages
Change-Id: Ifc24cb42df76c50f0ca40e3c793f36c355e483d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178730
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-12-18 22:30:45 +01:00
Xisco Fauli a3adfdb2d9 tdf#162798: python3: Add lib/importlib/readers.py
Somehow I missed to add it in a1295cb177
"python: upgrade to 3.10.14 (master only)"

Change-Id: I53e5fa6b89a7ac799041fd28ef4c2558df9743e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173323
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-13 19:12:12 +02:00
Taichi Haradaguchi 07468c71ad libffi: Upgrade to 3.4.6
* external/libffi/implicit-function-declaration.patch was obsolete after
https://github.com/libffi/libffi/pull/764
* Backport external/python3/0001-bpo-45898-Remove-duplicate-symbols-from-_ctypes-cfie.patch.1
from upstream to fix build errors on Windows.

Change-Id: I6d7cd70dd29ea0ce4b22738637afa0e7eb76a93f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167337
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-07-16 02:08:59 +02:00
Xisco Fauli b2ae2fa78f lxml: ignore warnings when calling setup.py build too
Reverts dc97b366ab
"python3: silence distutils deprecated warning"
and f41773d684
"python3: silence distutils deprecated warning (take 2)"
and c920605dd4
"external/lxml: Fix --enable-python=fully-internal build"

Change-Id: I9131fa5ac22cf4f0279e7bf0edc5c50b61845044
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170206
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-09 16:37:02 +02:00
Xisco Fauli 24bf1dbb32 python3: easy_install no longer exists on macosx
/bin/sh: line 1: easy_install-3.10: No such file or directory

Also seen in libreoffice-24-2 branch with python 3.8
/bin/sh: line 1: easy_install-3.8: No such file or directory

Change-Id: Ia4b26c4526c03bec2f06f19ec6ea8539332d43da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170176
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-09 10:46:30 +02:00
Xisco Fauli f41773d684 python3: silence distutils deprecated warning (take 2)
Since a1295cb177
"python: upgrade to 3.10.14 (master only)"

Now it fails with
Traceback (most recent call last):
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 23, in <module>
    import setupinfo
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setupinfo.py", line 7, in <module>
    from distutils.command.build_ext import build_ext as _build_ext
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/instdir/program/python-core-3.10.14/lib/distutils/command/build_ext.py", line 13, in <module>
    from distutils.sysconfig import customize_compiler, get_python_version
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/instdir/program/python-core-3.10.14/lib/distutils/sysconfig.py", line 58, in <module>
    warnings.warn(
DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/external/lxml/ExternalProject_lxml.mk:26: /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/ExternalProject/lxml/build] Error 1

Change-Id: I9000018390b31a65a30ef87d0c500872fc6c9343
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170069
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-06 18:54:59 +02:00
Xisco Fauli dc97b366ab python3: silence distutils deprecated warning
Since a1295cb177
"python: upgrade to 3.10.14 (master only)"
Some builds started to fail with

Traceback (most recent call last):
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 15, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/lxml/setup.py", line 17, in <module>
    from distutils.core import setup
  File "/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/instdir/program/python-core-3.10.14/lib/distutils/__init__.py", line 19, in <module>
    warnings.warn(_DEPRECATION_MESSAGE,
DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/external/lxml/ExternalProject_lxml.mk:26: /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/ExternalProject/lxml/build] Error 1

The problem is that python 3.10 doesn't bundle setuptools so
it's not possible to replace it at the moment

Change-Id: I9a9d077b51f49e912dab4941efe8751c2fcc76e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170068
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-07-06 17:37:46 +02:00
Xisco Fauli a1295cb177 python: upgrade to 3.10.14 (master only)
Downloaded from https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tar.xz

* external/python3/macos-11.patch.0 should be long
obsolete by now

Change-Id: I454851f7684e699519370bdbbcd9bb9a2cccd077
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170051
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-05 23:15:07 +02:00
Xisco Fauli 4a3706db4f pyuno: fix deprecated warnings
* Replace PyUnicode_FromUnicode(str, len) with PyUnicode_FromWideChar(str, len)
* Replace PyUnicode_AS_UNICODE(PyObject) with PyUnicode_AsWideCharString(PyObject, size)

Change-Id: I1d8b46059d72f4de261d99393e1681f1e41eafdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169625
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-05 23:14:52 +02:00
Stephan Bergmann 9e6b4732ca Fix --disable-runtime-optimizations build
...after 19e9e49bda "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-12 12:05:06 +02:00
Xisco Fauli 19e9e49bda python3: upgrade to 3.9.19
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-06-11 11:48:44 +02:00
Christian Lohmaier 875a1bf2e1 makefile simplification: replace $(call gb_UnpackedTarball_get_dir,foo)
…by a simple/static $(gb_UnpackedTarball_workdir)/foo
see also 0c4c84a14b

Change-Id: I8e6aa55c85534c4446556548910c950ddbe7c6fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167163
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2024-05-06 11:40:45 +02:00
Christian Lohmaier c1256034ff use --binary flag when applying patches with patch from git-bash
Change-Id: Idbd4ad7ad89dc727e2f0cf851c4c62f05d5b2a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166328
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-04-24 15:50:35 +02:00
Caolán McNamara 303ed9a964 python exits on initialization if fd 0 is a dir
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>
2024-03-28 09:41:54 +01:00
Michael Stahl a2fabc78a4 python3: name gdb pretty-printer after .so, not .bin
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-11-09 16:54:08 +01:00
Taichi Haradaguchi f1cb3bb773 Replace a tab with spaces
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-22 14:45:16 +02:00
Julien Nabet 8797ba5e5d Typo: Unfortuantely->Unfortunately (python3/ExternalProject_python3.mk)
Change-Id: I80d316c76196d8cdda4b2ad509d2d1b53b5c414a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157991
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2023-10-15 20:48:34 +02:00
Taichi Haradaguchi 7359700d5d Upgrade libffi to 3.4.4
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-14 15:51:09 +02:00
Taichi Haradaguchi c72d5d787f tdf#116412 include bz2 module in internal python
This commit includes the changes in 5e3510dbb6
and 219bef04b7, 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 5e3510dbb6.
* 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-14 08:53:14 +02:00
Andras Timar d4f1db0775 fix internal python build on aarch64-unknown-linux-gnu
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-10-10 20:49:23 +02:00
Stephan Bergmann 233e0a009a A more principled suppression of -fsanitize=function in external C code
...after
<https://github.com/llvm/llvm-project/commit/279a4d0d67c874e80c171666822f2fabdd6fa926>
"-fsanitize=function: support C".

This includes reverts of 16af9e8186 "update clang
asan suppressions" and 151a43f3d0 ""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-09-15 07:58:37 +02:00
Taichi Haradaguchi 5cd48b4969 Revert "tdf#116412: include bz2 in internal python"
This reverts commit 5e3510dbb6.

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-07 05:59:22 +02:00
Taichi Haradaguchi f454a77405 Revert "external/python3: fix Windows build"
This reverts commit 219bef04b7.

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-06 08:41:49 +02:00
Taichi Haradaguchi 219bef04b7 external/python3: fix Windows build
...after commit 5e3510dbb6
(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-08-06 04:29:29 +02:00
Taichi Haradaguchi 5e3510dbb6 tdf#116412: include bz2 in internal python
Change-Id: Ie257446692227ae689fad2e61a42405a68e4f665
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139580
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-07-30 09:20:29 +02:00
Michael Stahl 734d53534a python3: upgrade to release 3.8.17
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-06-07 15:18:15 +02:00
Andras Timar 86c53eb59a fix internal python build on powerpc64le-unknown-linux-gnu
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-02-09 12:08:24 +00:00
Stephan Bergmann 70bcf9e8be Remove support for AIX
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-27 07:28:16 +00:00
Taichi Haradaguchi 67c6e66c5b external/python3: fix line offsets in internal-zlib.patch.0
"@@ -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>
2023-01-16 07:37:22 +00:00
Christian Lohmaier a7a766aa41 macOS (janitor): remove workarounds for no longer supported SDKs
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-11-21 22:35:33 +01:00
Taichi Haradaguchi ea5843b67f Python3: update to 3.8.15
* 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-10-24 21:01:48 +02:00
Caolán McNamara a539db002b upgrade to openssl-3.0.5
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-10 15:34:54 +02:00
Stephan Bergmann 3b98992ce1 Remove obsolete comment
...after c8fd50f9ec "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-07 20:22:23 +02:00
Taichi Haradaguchi c8fd50f9ec python3: upgrade to release 3.8.13
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-09-07 16:02:03 +02:00
Stephan Bergmann 4a804f87eb external/python3: Avoid "ThreadSanitizer: destroy of a locked mutex"
..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-03-04 17:15:54 +01:00
Stephan Bergmann 5931638fda external/python3: Explicitly check that all extension modules got built
...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-02-23 11:12:10 +01:00
Jan-Marek Glogowski 4537886ec1 externals: always provide platform configure flags
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>
2022-01-31 10:31:04 +01:00
Aron Budea fa9ab05d78 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>
2021-12-24 08:02:11 +01:00
Mike Kaganski 8e779c062a Centralize VS-to-toolset mapping in configure
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-10-08 14:54:10 +02:00
Hossein c156a8c708 Add preliminary VS 2022 support
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-09-16 19:50:56 +02:00
Ilmari Lauhakangas ac586d1cae Make some scripts more portable
Change-Id: Ia89059eea51ca396a7c74143625ac9a6706de198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120773
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-08-20 12:32:22 +02:00