Commit Graph
887 Commits
Author SHA1 Message Date
Tomaž Vajngerl bfc9cfdecf Remove the lp_solve solver, which CoinMP makes redundant
The Lpsolve solver and the CoinMP solver are both used for the same
thing: a linear model, with optional integer variables by branch
and bound. CoinMP (CLP plus CBC) is the more capable and better
maintained of the two, so the lp_solve one adds a second bundled
dependency and a parallel copy of the solver code for no capability
the other lacks.

Remove the LpsolveSolver component, the bundled lp_solve external
(and its colamd dependency, which only lp_solve used), and all the
build, configure, packaging and license references to them.

A document may still name com.sun.star.comp.Calc.LpsolveSolver as
its engine. SolverSettings now reads that name as the CoinMP
solver, which solves the same model, so such documents keep
working.

The Calc solver test that exercised the engine now uses CoinMP. Its
knapsack model has a single optimal total value of 6987, which fills
the weight capacity of 1000 exactly and which CoinMP finds. The
lp_solve run had returned a suboptimal 6981, so the test now expects
the true optimum.

The build setup changes only take effect after re-running autogen.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ia14d8c491779873da6b0157aa524056275adf8f5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3810
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e77738a7ca7d44fd9d1f852e26d46e3a6d60467b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208038
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-14 12:49:42 +02:00
Xisco Fauli 7aa439a963 Drop --with-docrepair-fonts
it was relevant to Collabora Office only

it reverts
commit 958cabd2e9
Author: Andras Timar <andras.timar@collabora.com>
Date:   Sat Jun 29 23:18:25 2024 +0200

    Bundle fonts of Google's DocRepair Project

and

commit cd8ad433f0
Author: Caolán McNamara <caolan.mcnamara@collabora.com>
Date:   Fri Aug 23 22:13:34 2024 +0100

    tdf#161941 add --with-docrepair-fonts option

Change-Id: I7b30bdf1676dfa9ccf70610f5f8e594136ca2b0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207534
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-02 14:37:00 +02:00
Christian Lohmaier 90115f1bdb provide SOURCE_DATE_EPOCH when building from source
in preparation of adding options to use use stable timestamps in created
zip files/templates and similar.

also move the block that sets LIBO_THIS_YEAR to the section where
configure switches to SRCDIR to make it work in builddir != srcdir case

Change-Id: I286d7765277cde9d8449de375f522df7c33a6222
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207015
Tested-by: Jenkins
Reviewed-by: René Engelhard <rene@debian.org>
2026-06-21 17:38:09 +02:00
Christian Lohmaier 402a392bd4 packaging: faked-tcp can cause hangs, prefer fakeroot-sysv
especiall when creating installsets with high parallelism, the packaging
stage can hang until faked-tcp is killed.
So avoid this race-condition altogether by switching to the sysv backend
if available.

Change-Id: If554abb8fb51218e6055e70c98622be77ecce58e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205896
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2026-06-02 13:21:58 +02:00
Rene Engelhard cbc8eebc1f only conditionally enable the parquet filter
commit b14583ba37 initially added the
parquet filter with saying

    Note that this change makes it possible to load Apache Parquet files
    if and only if orcus has been built with the parquet import filter
    enabled.  Using orcus without the parquet import filter enabled will
    not break the build or run-time behavior; you just can't load parquet
    files.

This is bad since silently failing like this doesn't tell people what
the problem is. Not having the option at all is clearer and more deterministic.

And the internal liborcus in a "standard" LibreOffice build didn't build with parquet
enabled at all anyway, thus leaving LibreOffice offering the option without even able to
load the files.

This patch adds
 a) an explicit --with-parquet-filter configure flag on which the config
    is built or not
 b) based on that flag also gives --with-parquet-filter to liborcus'
    configure. (which then of course will make that liborcus linked
    against libparquet. But if people explicitely specify it..)
 c) fixes the build of liborcus against arrow 23 (see
    https://gitlab.com/orcus/orcus/-/commit/bae0e6e659cf4df2590288f566004eef7096dee4 -
    that incidentially also fixed the liborcus build against 22 for me

This is a generalized version of a local patch I carry in Debian - which
I added some time after I made liborcus in Debian *do*
--with-parquet-filter :)

Change-Id: I72b15893fe4fa8e08a556f27b2d6ab942c9858cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204685
Tested-by: Jenkins
Reviewed-by: René Engelhard <rene@debian.org>
2026-05-07 06:15:17 +02:00
Rene Engelhard 17b18f35b2 add --with-system-quickjs
and use ENABLE_QUICKJS instead of the QUICKJS BUILD_TYPE profile in Repository*mk

Change-Id: I0120352bd2f2a0c2eb8d6a00441c74a30c990879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203285
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 10:39:37 +02:00
Neil Roberts 7b2006f800 Download and build QuickJS as a static library
Builds QuickJS 0.14.0 as a static library. It is guarded by the configure
option --enable-quickjs/--disable-quickjs which is disabled by default
but enabled for Jenkins builds.

Downloaded from https://github.com/quickjs-ng/quickjs/releases/download/v0.14.0/quickjs-amalgam.zip

Change-Id: I8a62f27fef85c5d45feefb1e479a4dc24cc857a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203217
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 10:35:48 +02:00
Dan Williams f74c82da52 Also find zxcvbn headers in /usr/include/zxcvbn
configure only looked in /usr/include while Fedora packages put
the headers in /usr/include/zxcvbn/

Change-Id: I905e00840075af093307f56f7e6038840d3e91ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204533
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: René Engelhard <rene@debian.org>
2026-04-28 20:22:08 +02:00
Michael Weghorn 057f491458 tdf#170932 Allow building win vcl plugin alongside --enable-headless
commit 430f603c6a
    Author: Tor Lillqvist <tml@collabora.com>
    Date:   Tue Feb 25 19:52:15 2025 +0200

        Make --enable-headless possible also on Windows, for CODA-W

        [...]

        In the --enable-headless case, freetype, fontconfig and cairo are
        built. For now, cairo is built as a Library (DLL), but fontconfig and
        freetype as StaticLibrary. Possibly should change these to DLLs,
        too. (See preceding commits.) Do not build the vclplug_win.

had introduced support for --enable-headless on
Windows.

As described in the commit message, using the
--enable-headless autogen switch would result in vclplug_win
(i.e. the VCL plugin that provides the UI on Windows)
automatically getting disabled unconditionally.

As described in tdf#170932, this e.g. prevents using
headless mode for document conversion while still
allowing to start LO with a UI with the same build.

Separate the two features:
No longer disable vclplug_win automatically anymore when
--enable-headless is used.
Instead, introduce a new separate --disable-win
autogen switch to explicitly disable the win vcl plugin
(similar to other existing autogen params like
--disable-gtk3 to disable the gtk3 VCL plugin on Linux).

Add that new --disable-win switch to the
CODAWindows distro config, to achieve the original
goal of both enabling headless and disabling vclplug_win
for that build configuration.

Change-Id: I54bc34981327244aa1c8b0aa5b6277ffd1fb4531
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202043
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@iki.fi>
2026-03-19 12:45:03 +01:00
Xisco Fauli e403e84cb9 use cmake from VS extensions in WSL too
See https://gerrit.libreoffice.org/c/core/+/201805/comment/bc56beb5_4fb2fc27/

Change-Id: I3203d620270035d21b57f1be497d851119c04b40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201890
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2026-03-17 17:48:28 +01:00
Xisco Fauli fd9058c19f use cmake from visual studio extensions in cygwin
Change-Id: Id3b895e8833dd65457f4c03791f2aa698c4a27ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201805
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-03-16 15:53:37 +01:00
Xisco Fauli 7039373704 tdf#136822: Add VeraPDF as a PDF validator
For now, only validate those tests that are
conformant with the validator

verapdf-cli-1.29.0.jar has been generated using
https://github.com/veraPDF/veraPDF-apps/pull/415
and running 'mvn clean install'
Change-Id: Ic172100a120dc0f43f6de526660961d34dc6b415

Change-Id: Icacc8ccbd938f779b506fb5e1820f10a539ab77b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198556
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-02-20 08:31:47 +01:00
Tor Lillqvist e022e99557 Revert "Fixes for Python cross-compilation, Linux to Linux at least"
Nah, this is too complicated, and I am not interested enough.

This reverts commit 942afbd439.

Change-Id: I436236e17cd3d2387b905a02c972b70e2456929d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198153
Tested-by: Tor Lillqvist <tml@iki.fi>
Reviewed-by: Tor Lillqvist <tml@iki.fi>
2026-01-26 18:25:48 +01:00
Tor Lillqvist 942afbd439 Fixes for Python cross-compilation, Linux to Linux at least
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
2026-01-23 11:54:21 +01:00
Rene Engelhard 8595bdadb9 remove JITC_PROCESSOR_TYPE export for powerpc
long obsolete; there's no IBM JDK for 32-bit ppc anymore. And it breaks
creating instdir/program/soffice with +x by cp (sed doesn't keep the
permission, obviously)

Change-Id: I9e8ffc6017056adb5142099a661761c2caaa87c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195487
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-12-12 08:31:33 +01:00
Stephan Bergmann fd00573b6c CLANG_16 is always true now
...after f0625d2291 "Update Clang baseline version
check"

Change-Id: I00c176fb044e425989fcabf7b3bdb2cf150a6fee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195206
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-12-08 10:40:54 +01:00
Xisco Fauli 1cb84d60d9 external: add lzma
Only needed for Linux and Mac. For Windows
we build it from python3 using liblzma.vcxproj

Add external/lzma/config.patch to remove some defines
causing errors

Downloaded from https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.gz

Change-Id: Ic3317ec54b1da838a10db9e6c3127bf9c33ca146
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193225
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-11-11 21:39:24 +01:00
Caolán McNamara 9e18540c73 implement system afdko
by shelling out to call the command line equivalents

note: makeotf is makeotfexe on Fedora

Change-Id: I933c456791ecf0f905f4595175a6d458b1444f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193343
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-11-03 20:28:29 +01:00
Xisco Fauli 71d738ed14 some janitorial work
after

commit f98ce0f91b
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Mon Oct 27 14:39:23 2025 +0100

    external: Add sqlite3

and

commit 1dfb0c9936
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Tue Sep 23 13:17:41 2025 +0200

    tdf#168512: python3: bundle sqlite3

Based on https://gerrit.libreoffice.org/c/core/+/193225/comments/b7f0a403_822adc42

Change-Id: I82f9dd6b9238df94b5c4619d003f67871885945c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193351
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-11-03 17:15:50 +01:00
Xisco Fauli f98ce0f91b external: Add sqlite3
This is needed to build python's bundled sqlite3 on linux and windows

Downloaded from https://sqlite.org/2025/sqlite-amalgamation-3500400.zip

Change-Id: I5480dc8d325bae59ee8a39ba909447c4470bc4aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193047
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-10-29 14:21:22 +01:00
Mike Kaganski b6feccc9a2 Replace dtoa with fast_float for faster string-to-float parsing
fast_float implements C++17 from_chars for floating-point types, which
is still unavailable even in the latest versions of compilers e.g. for
macOS. It is maintained, unlike dtoa; it is said to be adopted as the
from_chars implementation for gcc. It is header-only, which simplifies
many things.

Change-Id: I6b597d4d35a076930e6e35f4f8cff3ca84f48ba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191248
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-09-21 08:17:39 +02:00
Thorsten Behrens b9ab692883 Cleanup BOOST_SYSTEM_LIB after upgrade to boost 1.89
Fixup after 421a66fc52 which left some
BOOST_SYSTEM_LIB usage, breaking system-boost builds.

Change-Id: I64bdcc163a954927684a83bf1c1ef98238acf9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191078
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behrens@collabora.com>
Tested-by: Jenkins
2025-09-17 15:00:35 +02:00
Mohamed Ali dc5847209e Rust Bindings: Add --enable-rust-uno configure option
- Add ENABLE_RUST_UNO configure flag and autoconf detection
- Prepare build infrastructure for rust_uno module integration

GSoC 2025: Rust UNO Language Binding

Change-Id: If3ea3129db70ffd179b199f9478d6e22850c42fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190382
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-09-11 21:38:49 +02:00
Stephan Bergmann a8c080bb3e Add --enable-embindtest-uno
...to enable "the UNO parts (types and servie implementation) of the embindtest
framework (which can also be used independently of the Emscripten build)."  And
which e.g. both last year's Lua GSoC project and this year's Rust GSoC project
(<https://gerrit.libreoffice.org/c/core/+/186425> "Add core UNO types for Rust
language binding") enabled locally in their respective dev builds.

Change-Id: I8cf917fbcdaf73e244bd84689a1f29f3aa95f923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189363
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-08-11 18:02:08 +02:00
Rene Engelhard e4dc378991 implement --with-system-colamd (for internal lpsolve)
using suitesparse. Tested with both suitesparse 5.12.0 (Debian stable,
without pc) and 7.9.0 (Debian unstable, with .pc)

Change-Id: I6e0d014455ea2dec111aa3380bd49bd586dfad0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182444
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-08-05 12:17:08 +02:00
Stephan Bergmann 966076d841 Add an --enable-dependency-tracking=sysincludes option
(Which I find useful when working on the C++ code of the Emscripten that is used
to build LO and having ccache's depend mode, CCACHE_DEPEND=1, enabled:
Otherwise, ccache would generally not rebuild our code when included
emscripten/*.h include files have changed.)

Change-Id: Ic513934f81c72232653b5e4c423611571e63ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188479
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2025-07-29 09:57:27 +02:00
Caolán McNamara 7a4e60b63d add -Wl,-z,relro,-z,now to hardening ldflags
See: https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro

as a happy side effect this reduces dirty pages as measured by

pmap -px PID|grep 'rw.--'|grep -v anon|awk '{ sum+=$4 } END { print sum }'

for a --with-distro=CPLinux-LOKit build and spawned kit calc process from
2588 to 2352 pages

Change-Id: I86b3ae025300907a240affd6d9a3d36d2eecbfb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187469
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-07-07 12:37:16 +02:00
Christian Lohmaier 41ebd4c123 add --enable-gcov configure flag (instaed of manually setting flags)
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>
2025-06-23 15:15:58 +02:00
Ujjawal Kumar 8539f39c84 Add MD4C common mark import library
MD4C is Markdown parser implementation in C, compliant with the
CommonMark specification v0.31

Change-Id: Id0ab4d60d9ba9815feb954705d767022fffd5d08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183850
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2025-06-22 14:03:08 +02:00
Christian Lohmaier d39842d01b cleanup msvcdll stuff
was needed for the 64bit shell extensions in a 32bit build of
LibreOffice, but that was already broken by
ec0a49ecc7 since that not only removed the
ucrt stuff, but also external/msc-externals/Package_msvc_dlls.mk that
would have registered the files to be packaged into the installation
set. So remove that bit for good and do some related cleanup.

Change-Id: I0b963dcf48eb66cb37d3a6bf017c2ee9aa3fbdf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185566
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-05-24 23:40:47 +02:00
Christian Lohmaier 9430b6549a use meson as an external when building with fully-internal python
people didn't read configure's warnings and systemwide installed copy of
meson just causes too many conflicts or even if people read the message
they'd still break the idea behind fully-internal python.

If the user specifies MESON in autogen.input it will be called as
specified, if configure autodetects it, it will be prefixed with the
python command used for building.

meson requires python 3.7, so if harfbuzz is enabled configure now also
now checks for that (can by bypassed by setting PYTHON in autogen.input

Change-Id: I6535c9f421fe865b389a87252163ab99d617b7b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185032
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2025-05-09 19:54:07 +02:00
Michael Stahl 8f8034177b LOCRDT editeng,sfx2,sw: experimental yrs collab
This can be enabled in configure via --with-yrs=...; see also README.yrs

Currently this is hardcoded to run over a local named pipe.

Everything related to editengine is implemented in EditDoc and made
accessible via its wrapper classes; everything related to communication
and accessing sw's comment is implemented in sw::DocumentStateManager.

The acceptor starts in SwView::SwView(), once SwPostItMgr exists.

There is a hack in SfxFrameLoader_Impl::load() to fetch the document
that the accepting soffice has loaded, and load it in the connecting
soffice as well.

Change-Id: I89476b5864b70f479bcf15989374c1c65b5da9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175652
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-07 13:36:01 +02:00
Akshay Kumar Dubey b410749d30 tdf#137308 - Add zstd build support and decompression classes
Integrate build system support for the Zstandard (zstd) library and
implement the corresponding C++ decompression stream classes, enabling
future use of zstd-compressed streams in ZIP packages.

Build System (Part 2a):
- Add `--with-system-zstd=[yes|no|auto]` configure option.
- Implement system library checks (`zstd.h`, `libzstd`) in configure.ac.
- Define rules (`external/zstd/*`) for downloading and building the
  internal zstd static library (decompression components only).
- Set up necessary CFLAGS/LIBS via configure.ac and config_host.mk.in.
- Configure linking via RepositoryExternal.mk (`gb_LinkTarget__use_zstd`).
- Update auxiliary files (download.lst, distro-configs, etc.).

C++ Implementation (Part 2b):
- Implement `InflateZstd` (in `include/package`) and `InflaterBytesZstd`
  (in `package/inc`) inheriting from `Inflater`/`InflaterBytes`.
- Use the zstd streaming API (`ZSTD_decompressStream`) following the
  existing single-call pattern established by the zlib implementation.
- Manage context (`ZSTD_DCtx`) and input buffer (`ZSTD_inBuffer`) state.
- Handle errors, stream completion (`ret == 0`), and input truncation.
- Add new classes to `package/Library_package2.mk` build.

This completes the infrastructure for zstd decompression support.
The next step (Part 2c) involves adding logic to select the
appropriate Inflater based on the ZIP entry's compression method ID.

Change-Id: Ia673f3f19b6a751ba5225394fcf8c3f145c4ae63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184243
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-05-01 12:18:19 +02:00
Stephan Bergmann dfbdb858e2 Instead of warning and failing, just do the right thing
After df83ad933b "fix harfbuzz build with
--enable-python=fully-internal on linux", my --enable-python=fully-internal
Linux builds that auto-detect MESON=/usr/bin/meson started to emit a configure
warning

> * WARNING : using internal python with a meson launcher might not work, best to use MESON=/path/to/meson.py in autogen.input

and then fail to build ExternalProject_harfbuzz with

> Traceback (most recent call last):
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 563, in from_name
>     return next(cls.discover(name=name))
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> StopIteration
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/usr/bin/meson", line 33, in <module>
>     sys.exit(load_entry_point('meson==1.7.0', 'console_scripts', 'meson')())
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/bin/meson", line 22, in importlib_load_entry_point
>     for entry_point in distribution(dist_name).entry_points
>                        ^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 982, in distribution
>     return Distribution.from_name(distribution_name)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/home/sberg/lo/core/instdir/program/python-core-3.11.12/lib/importlib/metadata/__init__.py", line 565, in from_name
>     raise PackageNotFoundError(name)
> importlib.metadata.PackageNotFoundError: No package metadata was found for meson

So better add back the idea from 736998ccef "Only
run meson from python when it apparently needs to be" (that had been removed
with df83ad933b "fix harfbuzz build with
--enable-python=fully-internal on linux") to treat a Meson executable that
doesn't advertise itself as being a Python script as just any plain executable,
which we don't throw at our --enable-python=fully-internal interpreter.  (Just
like, say, an Emscripten build of LO uses an emcc compiler executable that
internally uses Python, and onto which we don't force our
--enable-python=fully-internal interpreter, either.)

Change-Id: I13965ef08043f350e9614bd61a469708b7faf27b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184626
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-25 20:38:53 +02:00
Stephan Bergmann 17679f5cac Pass NINJA into Meson in ExternalProject_harfbuzz
...otherwise my macOS build with autogen.input containing (among others)

> NINJA=/Users/stephan/lo/lode/opt/bin/ninja

would have failed building ExternalProject_harfbuzz with

> ERROR: Could not detect Ninja v1.8.2 or newer

Change-Id: I39260ae7fea9808fe26b9e63c3c7aaaa4c27103d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184502
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-04-23 19:03:08 +02:00
Christian Lohmaier ae24fc8c63 harfbuzz: migrate to meson
Change-Id: I33aa7ca814409b39b9adb7da1d168c5ebb11b14d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183345
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2025-04-14 18:35:42 +02:00
Moritz Duge 3cf71eec36 WASM enable Impress for WASM builds
Change-Id: Ib0e8f073f9fb74bd0fd3b00e8f31f620f8aa9f39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182750
Tested-by: Jenkins
Reviewed-by: Moritz Duge <moritz.duge@allotropia.de>
2025-03-12 17:37:50 +01:00
Stephan Bergmann 541eacf801 Reinstate the JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround
...for Java versions < 24.  As discussed in the comments starting at
<https://gerrit.libreoffice.org/c/core/+/132558/4#message-4fd391160f395455362289909dadb7d2663f4ff2>
"Allow building against JDK 18", the previous
35d9ec3e59 "Remove the
JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround" had started to resurface
the old "exception and build failure with JDK 21/22/23 on macOS Sequoia."

So keep the workaround for Java versions < 24, and hope that we won't run into
scenarios where we combine a Java version >= 24 (for which the workaround would
cause the new build failure) with an Ant version that requires the workaround.

Change-Id: Ib886f68d5c17ace2384f22672dcc2d0478830228
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182454
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-03-04 11:43:20 +01:00
Stephan Bergmann 35d9ec3e59 Remove the JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD workaround
...that had been introduced with 19de5d97ef "Allow
building against JDK 18" to work around odd failures of ExternalProject_hsqldb
with whatever versions of JDK 18 and Ant I had been using at that time.

However, with java-latest-openjdk-24.0.0.0.36-1.rolling.fc41.x86_64 that
workaround now started to make ExternalProject_hsqldb fail for me with

> ERROR: JVMTI: 112(JVMTI_ERROR_WRONG_PHASE): Cannot get thread info
> ERROR: JVMTI: 112(JVMTI_ERROR_WRONG_PHASE): jvmtiEnv::GetLoadedClasses()
> Error occurred during initialization of VM
> java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
> 	at java.lang.System.initPhase3(java.base@24/System.java:1947)

apparently because of <https://openjdk.org/projects/jdk/24/>'s
<https://openjdk.org/jeps/486> "JEP 486: Permanently Disable the Security
Manager".

But with the ant-1.10.14-13.fc41.noarch I'm using now, neither
java-21-openjdk-21.0.6.0.7-6.fc41 (I no longer have the problematic-back-then
JDK 18) nor java-latest-openjdk-24.0.0.0.36-1.rolling.fc41.x86_64 appear to need
that workaround anymore anyway (presumably because "an updated version of Apache
Ant [has] become available", as discussed in the commit message of that
19de5d97ef).

Change-Id: Id13b57559df486012c888247c96323716168c97d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182419
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-03 10:27:06 +01:00
Bingwu Zhang be1b310125 skia: enable LASX explicitly to LASX binary compatible objects
Fix skia build on LA64 for the second time (:

Enable LASX intrinsics explicitly when building with LASX binary
compatibility.

In function ‘__lasx_xvsub_h’,
inlined from ‘S32_alpha_D32_filter_DX’ at .../workdir/UnpackedTarball/skia/src/opts/SkBitmapProcState_opts.h:323:43:
/usr/lib/gcc/loongarch64-aosc-linux-gnu/14.2.0/include/lasxintrin.h:539:42: error: built-in function ‘__builtin_lasx_xvsub_h’ is not enabled
539 | return (__m256i)__builtin_lasx_xvsub_h ((v16i16)_1, (v16i16)_2);

cf. https://buildit.aosc.io/logs/62784-libreoffice-25.2.0.3-loongarch64-loong13-2025-02-07-22:04:10.txt

Link: https://skia-review.googlesource.com/c/skia/+/873776
Fixes: I232b4656a87a4c3d87d669769c6483e01425c0e6
Tested-by: Bingwu Zhang <xtex@aosc.io>
Change-Id: I9fbf0f24f28f71a76c10ee31e9a9da00ff350481
Signed-off-by: Bingwu Zhang <xtex@aosc.io>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181256
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-01 12:29:54 +01:00
Christian Lohmaier 1cd643693f drop obsolete android-gcc-toolchain switch
it had been deprecated since ndk 13 where it defaulted to clang already
and had been completely removed in ndk 18

nss still checks for it in the nss/coreconf/Linux.mk makefile, but the
paths it tries to set up there are unused/don't exist for a long while.

Change-Id: Ie37104ae59b2143ec4645af3ff437ad06792ee65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181852
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-02-20 16:29:16 +01:00
Stephan Bergmann 6e1026caca external/firebird: Avoid ODR violation issues from sanitizer builds
My local ASan/UBSan builds of d37c60c5e2b793c0934d431e59c8cb3ff1a170b6
"external/firebird: Drop -fno-rtti from sanitizer builds" against LLVM 21 trunk
had been fine, but <https://ci.libreoffice.org/job/lo_ubsan/3459/> against
lode's LLVM 12.0.1 started to fail with

> ==3374322==ERROR: AddressSanitizer: odr-violation (0x0000007af7a0):
>   [1] size=16 'typeinfo for Firebird::Exception' /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp
>   [2] size=16 'typeinfo for Firebird::Exception' /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/firebird/src/common/fb_exception.cpp
> These globals were registered at these points:
>   [1]:
>     #0 0x440738 in __asan_register_globals.part.0 /home/tdf/lode/packages/llvm-llvmorg-12.0.1.src/compiler-rt/lib/asan/asan_globals.cpp:360:3
>     #1 0x68237b in asan.module_ctor (/workdir/UnpackedTarball/firebird/gen/Debug/firebird/bin/isql+0x68237b)
>
>   [2]:
>     #0 0x440738 in __asan_register_globals.part.0 /home/tdf/lode/packages/llvm-llvmorg-12.0.1.src/compiler-rt/lib/asan/asan_globals.cpp:360:3
>     #1 0x7f5ccdec01ab in asan.module_ctor (/workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.so.2+0x9b41ab)

What appears to make a difference there is
<https://github.com/llvm/llvm-project/commit/1ada819c237bf724e6eaa1c82b2742e3eb57a5d5>
"[asan] Default to -fsanitize-address-use-odr-indicator for non-Windows", first
appearing in LLVM 16:  My local ASan/UBSan LLVM 21 trunk build, which builds
external/firebird fine, has

> 0000000000ee5166 B __odr_asan_gen__ZTIN8Firebird9ExceptionE
> 000000000045b960 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/bin/isql and

> 0000000000e49920 b __odr_asan_gen__ZTIN8Firebird9ExceptionE
> 0000000000b9d100 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.so.2, but
when I rebuild it with -fno-sanitize-address-use-odr-indicator, it has only

> 000000000045bbc0 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/bin/isql and only

> 0000000000b9d1c0 D _ZTIN8Firebird9ExceptionE

in workdir/UnpackedTarball/firebird/gen/Debug/firebird/lib/libfbclient.so.2, and
fails the same way as <https://ci.libreoffice.org/job/lo_ubsan/3459/>.

So make the "Drop -fno-rtti" patch depend on Clang >= 16 (recorded, for
simplicity, with a bespoke new CLANG_16 config_host.mk variable).

Change-Id: I70a8ce8eb535265d592d470718d6b3a6765d5bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181235
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2025-02-07 11:38:12 +01:00
Andras Timar a76a0ca930 Remove obsolete Numbertext 0.9.5 extension
There is no point to bundle it, because
1) it is an old version
2) since LibreOffice 7.5 there are built-in number formats in
   Calc with the same functionality (using libnumbertext FWIW)

Change-Id: I8cfb24f7e6f045bd51fea620aca6a61269dba77a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180996
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2025-02-01 16:47:45 +01:00
Stephan Bergmann 795e6f6f3e Introduce EMSCRIPTEN_EXTRA_QTLOADER_CONFIG
for use in Emscripten --enable-qt6 builds, to e.g. add command line arguments
(like --writer) into qt_soffice.html.

For standard --enable-qt5 Emscripten builds, it works to specify an

> EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS=/path/to/include.js

containing

> Module.arguments = ['--writer'];

to make qt_soffice.html open a Writer document.  Due to how the Qt loading has
changed in Qt6, that no longer works for --enable-qt6 Emscripten builds.  But
what works there now is to instead specify an

> EMSCRIPTEN_EXTRA_QTLOADER_CONFIG=arguments:['--writer']

(The sed -z option that is necessary to replace text spanning a newline is a
non-standard GNU extension, but lets assume that this is only executed for
cross-builds from Linux that use GNU sed.)

Change-Id: I31372a7a1f8fccbe0fe2594614bf5846e5e5c95f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-28 13:20:25 +01:00
Xisco Fauli be1d81eeea prevent assignment if ENABLE_MSVC_ANALYZE exists
so export ENABLE_MSVC_ANALYZE=1 can be used
in https://ci.libreoffice.org/job/lo_tb_master_win_analyze/

if a macro/variable is only used by make, then there's no need to use export in config_host.mk

Change-Id: I31ebef21c92dfaa279bd3bf7e5e5ecef1e960ac2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180384
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-01-17 15:54:11 +01:00
Mike Kaganski ec0a49ecc7 Windows 7-8.1 support was removed, prevent install on these old systems
There is no simple "Windows is 10 or newer" check in MSI, with the
Microsoft policy of "you don't need to know real Windows version".
See also https://developercommunity.visualstudio.com/t/detect-a-windows-version-from-msi/412198

The values that MSI sees (e.g. on my Win11) are:

Property(C): VersionNT = 603
Property(C): VersionNT64 = 603
Property(C): WindowsBuild = 9600

So those can't be used for the check. I use the WINMAJORVER that is
read from registry (Software\Microsoft\Windows NT\CurrentVersion).

There is no more need to check and install UCRT; it was dropped.

Change-Id: Ic02d6aeb965e9684bafd4357f969980f77000e73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178049
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-07 20:06:46 +01:00
Christian Lohmaier c3ed6e5a2c windows: use jom instead of nmake to build openssl if available
jom (https://wiki.qt.io/Jom) is a parallel version of nmake that
especially helps with building openssl since everything is compiled
individually/the compiler cannot use parallelism either.
Also in a LibreOffice build there's not much else that can be done in
parallel/other stuff requires openssl to be built to continue.

Change-Id: Ib16b0f947991a1d3255aeae7dc5d9bdee0b157a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177743
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2024-12-03 18:07:38 +01:00
Sakura286 d17a495c5c tdf#152943: Add configure option to disable NaN payload related tests
Because some architecture(such as riscv64) does not support NaN
  payload (NaN propagation), skipping the related tests might be a
  good choice for builders who has already known the risk of lacking
  NaN payload support.

  Currently the tests that could be skipped via --disable-nan-tests are:

  - rtl_math: test_payloadNaN
  - sc_ucalc_formula2: testExternalRefFunctions
  - sc_ucalc_formula2: testFuncGCD
  - sc_ucalc_formula2: testFuncLCM
  - sc_ucalc_nanpayload: testNanPayload

Change-Id: Ia8834595a8b469d8c542809b3e580a3f6316ef20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174801
Reviewed-by: René Engelhard <rene@debian.org>
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: René Engelhard <rene@debian.org>
2024-11-27 20:06:40 +01:00
Stephan Bergmann f510ce620f Add experimental support for Emscripten JSPI
...which I've seen fundamentally working when building with recent emsdk against
recent Qt6 trunk (and including <https://github.com/qt/qtbase/pull/108> "Update
the check for WebAssembly JSPI support") and running on recent Chrome (with JSPI
enabled under <chrome://flags/>)

Change-Id: I98c11c5ee7e95b135ddc33c95c95752055ecd4c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176031
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-04 20:47:05 +01:00
Stephan Bergmann 9416bafc23 Adapt to generation of .worker.js files gone from 3.1.68
...and just unused dummies since 3.1.58, so don't install them for >= 3.1.58,
even if the dummies would still be available for < 3.1.68

Change-Id: Ida55be2fa3b75982bfd764b7b2676e63c092fe79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175822
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-10-30 13:51:40 +01:00