KillPython runs an inline CodeTaskFactory task that compiles a temporary
dll and loads it. Two parallel builds on one machine race over that dll,
and one build fails to find it:
pyproject.props(176,5): error MSB4175: The task factory "CodeTaskFactory"
could not be loaded from the assembly "...\Microsoft.Build.Tasks.Core.dll".
Could not find file '...\tmp\rmlsuizu\rmlsuizu.dll'.
KillPython only kills a stray python.exe that holds the output file open
across an incremental rebuild. A clean build has none to kill, so pass
/p:KillPython=false to override pythoncore.vcxproj and skip the target.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ic6cc3d51d4409bce6cc95137626debcab67dbc53
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10183
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit a287185f62eaa49f03ab0b3b2e5d956221ef9997)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210291
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
a handful of other libs like curl, the mariadb-, ldap-, postgresqel
connector and python depend on it and are in turn not reproducible if
openssl differs
Python has code generators that result in differences unless the var is set
Change-Id: I6fe61a41802442821092182b418c4cd073fa18bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207290
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Seen on my VS2026 build:
"C:\lo\online.build\workdir\UnpackedTarball\python3\PCBuild\pcbuild.sln" (Build target) (1) ->
"C:\lo\online.build\workdir\UnpackedTarball\python3\PCBuild\pythonw_uwp.vcxproj" (default target) (42) ->
(ClCompile target) ->
C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.51.36231\include\experimental\coroutine(37,1): error C2338: static assertion failed: 'error STL1011: The /await compiler option, <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> are deprecated by Microsoft and will be REMOVED SOON. They are superseded by the C++20 <coroutine> and C++23 <generator> headers. You can define _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS to suppress this error for now.' [C:\lo\online.build\workdir\UnpackedTarball\python3\PCBuild\pythonw_uwp.vcxproj]
Use CL env variable to pass the define through MSBuild to cl.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Id9658290bfcd52150e5e1465a8c3f7e7e84de886
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2647
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 2157c69794264ff0567c7327509fb1a2d4fc5cb6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206340
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This reverts commit 99e6d15b3f.
Reason for revert: Some people has reported the python build fails
because it calls ./PCbuild/find_python.bat mid build
Revert this patch until I found why find_python.bat is still being
called sometimes
Change-Id: I8235e8e24538b7cf0c7af8bf1d00f8d6c89f21f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204835
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
If --with-python=internal is used, then building its curses module
expects an ncurses header with wide char support, otherwise the build
fails with:
/usr/bin/ccache clang -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize-blacklist=sanitize-ubsan-excludelist -fno-sanitize=function -Iworkdir/UnpackedTarball/bzip2 -Iworkdir/UnpackedTarball/expat/lib -Iworkdir/UnpackedTarball/sqlite3 -Iworkdir/UnpackedTarball/lzma/src/liblzma/api -fno-strict-overflow -Wsign-compare -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Og -Wall -Iworkdir/UnpackedTarball/zlib -O0 -Wp,-U_FORTIFY_SOURCE -fstrict-aliasing -fstrict-overflow -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -fPIC -fPIC -c ./Modules/_cursesmodule.c -o Modules/_cursesmodule.o
./Modules/_cursesmodule.c:764:9: error: call to undeclared function 'setcchar'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
764 | setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL);
| ^
Turns out that /usr/include/ncurses.h and
/usr/include/ncursesw/ncurses.h are not the same here and only the later
provides the wide char support.
Fix this by explicitly adding /usr/include/ncursesw to the include path
on Linux, which should help when that dir exists and it's meant to be
ignored otherwise.
Change-Id: Ic967163d4dbab5df6a0c95146f0d92b564c9901c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201935
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
When not using a system Python, set PYTHON_FOR_BUILD to point to the
python script in the instdir_for_build/program folder. Make sure that
script gets installed by adding it to gb_BUILD_TOOLS_executables and
by adding pyuno to the cross_toolset modules. Make also the
SYSTEM_PYTHON boolean flag visible to the cross-build (in the normal
way, as SYSTEM_PYTHON_FOR_BUILD).
When cross-compiling Python to Linux, pass some ac_cv_* settings that
can't be determined at compile time.
Change-Id: I5224966698dca03df9545f5552671f0dce00b4ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197540
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Jenkins
> Objects/listobject.c:1370:37: runtime error: applying zero offset to null pointer
> #0 0x7f38b863523a in list_extend_dictitems /workdir/UnpackedTarball/python3/Objects/listobject.c:1370:37
> #1 0x7f38b862a555 in _list_extend /workdir/UnpackedTarball/python3/Objects/listobject.c:1435:15
> #2 0x7f38b8651977 in list___init___impl /workdir/UnpackedTarball/python3/Objects/listobject.c:3467:13
> #3 0x7f38b86305d3 in list_vectorcall /workdir/UnpackedTarball/python3/Objects/listobject.c:3491:13
[...]
as seen while building workdir/XcuFilterFiltersTarget/fcfg_impress_filters.xcu
etc. at <https://ci.libreoffice.org/job/lo_ubsan/3756/>.
(Same as 314c4b5ef949f5bb1a4f13048726c440e556ba67 "external/python3: Silence
UBSan 'applying zero offset to null pointer'", this only gets reported with old
Clang prior to Clang 20
<https://github.com/llvm/llvm-project/commit/4847395c5459f9c476808f9337abdae7fbd78a23>
"[Clang] Adjust pointer-overflow sanitizer for N3322 (#120719)".)
Change-Id: I15129f5fa3eb3c0f92d6e3a80f914f63e12efdb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195894
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
...that 241826dcb9 "python3: upgrade to 3.13.11
(master only)" had simply dropped, but which is still necessary to silence
pointer-overflow issues as discussed in the commit message of
fcaef01faf "external/python3: Silence
pointer-overflow" (now, it caused e.g.
> [FIO] fcfg_database_others.xcu
> Parser/lexer/buffer.c:30:41: runtime error: pointer index expression with base 0x7d8e21edb920 overflowed to 0xfffffffffffe2000
> #0 in _PyLexer_restore_fstring_buffers at workdir/UnpackedTarball/python3/Parser/lexer/buffer.c:30:41
> #1 in _PyLexer_tok_reserve_buf at workdir/UnpackedTarball/python3/Parser/lexer/buffer.c:73:9
> #2 in tok_readline_raw at workdir/UnpackedTarball/python3/Parser/tokenizer/file_tokenizer.c:59:14
[...]
to fail during the build)
Change-Id: Ib91feb446f6dfcbe3e60b8e3b54ac6503546ddda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195773
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
and use the same config.h in all platforms.
Compiling these libraries only takes a few seconds
so no need to exclude Windows here
it should also fix the win arm64 build
This patch reverts
commit e4421ce01d
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Mon Nov 10 22:35:22 2025 +0100
sqlite3: don't create a static library on Windows
and part of
commit 1cb84d60d9
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Thu Oct 30 20:11:23 2025 +0100
external: add lzma
Change-Id: Ia66242d4fef78cf8d99f853db4c9eee2e24c62ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194023
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
there was already parts of that in the makefile that would require
running "make gb_GCOV=YES" - but that alone was not enough, you were
also kinda expected to set LDFLAGS on the commandline (or at least it
had bitrotted to this state) - so just make it into a proper configure
switch.
Building with lto fails at least on baseline with
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3befe0)
: undefined reference to `.L1'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3befe8)
: undefined reference to `.L1'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3bf018)
: undefined reference to `.L2'
/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: /tmp/ccaE1KD4.ltrans31.ltrans.o:(.data.rel.ro.local+0x3bf020)
: undefined reference to `.L2'
[…many more of those with incrementing references…]
So for now warn if both are used.
Change-Id: I2c3427b48174de77a6894293a5e784df8ee24bd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186821
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Mac never executes this code. See
$(if $(filter MACOSX,$(OS)),GeneratedPackage_python3,ExternalPackage_python3)
in external/python3/Module_python3.mk
Change-Id: I928f480945279f13f8ff3c398ddbbed133b9d9ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183369
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
In order to fix
ERROR: Could not install packages due to an OSError: Could not find a suitable TLS CA certificate bundle, invalid path:
/home/xisco/libreoffice/instdir/program/python-core-3.11.11/lib/pip/_vendor/certifi/cacert.pem
when using pip install
Change-Id: I84d6c23021523c11803bc2b0858d69a706da0dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180788
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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>
...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>
...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>
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>