82 Commits
Author SHA1 Message Date
Caolán McNamara e8e4c0a88f libxml2: build with cmake's ninja generator on Windows
A: ninja can make use of ccache out of the box
B: ninja participates in the toplevel make job server

The target architecture now comes from the compiler configure selected
instead of the generator's -A.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I86951768ae42a6684b80298ff149af6c8d8d7fb7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10654
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 29fc77fea92e28dc007781d7f728b67f5b55c58b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210984
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-17 09:02:04 +02:00
Xisco Fauli f5a815318d libxml2: upgrade to 2.15.2
0001-const-up-allowPCData.patch.1 has been fixed
upstream

Change-Id: I59548b8b5c9c159ed8ab5db6727b1cb0b5132ac0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203005
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-03-31 08:29:02 +02:00
Xisco Fauli 3bb1efbee4 libxml2: migrate to CMake on Windows
In preparation for the upgrade to 2.15

Change-Id: I439cf6d1d113d97b5f23421da018736305eb683e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192827
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-03-30 21:48:48 +02:00
Xisco Fauli 87a485f5ee libxml2: fix configure unrecognized options
--disable-ipv6 was dropped in libxml2 2.14

Change-Id: I1150a310906e4ba2aaab90ed6de017234dc720a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200940
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-03-04 13:40:06 +01:00
Tor Lillqvist 951a74d047 Add --enable-msvc-debug-runtime to use that even without dbgutil
Adapt libxml2 build accordingly. It's MSVC_USE_DEBUG_RUNTIME we should
check to see whether the ICU libraries have a 'd' suffix in their
names, not ENABLE_DBGUTIL.

Change-Id: Ic817e3c15e7164478ae557627047d3793e3a88c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194584
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196618
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Jenkins
2026-01-06 21:07:34 +01:00
Xisco Fauli 5e9caecd24 libxml2: upgrade to 2.14.6
9de92ed78d8495527c5d7a4d0cc76c1f83768195.patch.1 has been fixed upstream

Downloaded from https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.6.tar.xz

Change-Id: Ibfd34613bc74644830b2e45c32c16462e7c7bd32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190720
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-09-09 18:09:55 +02:00
Michael Weghorn c368f94db2 libxml2: Ignore deprecations for system libxml2 as well for now
commit e3b5e3aebc
    Date:   Wed Apr 23 13:38:50 2025 +0200

        libxml2: upgrade to 2.14.3

        * In https://gitlab.gnome.org/GNOME/libxml2/-/commit/712a31abe458eed75f0e2a442b35af58cf7091ca
        some members used by Libreoffice were marked as deprecated.
        Add deprecated.patch.0 to undeprecate them for now.
        Meanwhile
        https://gitlab.gnome.org/GNOME/libxml2/-/issues/936#note_2461334 has been
        opened to discuss it. The necessary code changes
        will be addressed in a follow-up commit
        [...]

added a patch to ignore deprecated symbols in
the internal libxml2, by undeprecating the symbols for
that version.

Drop that patch again and instead let compilers ignore
the deprecation warnings for now, to also make the --enable-werror
build pass for the (default) system libxml2 used e.g. on
Debian testing (which currently provides 2.14.5+dfsg-0.2).

Build failure seen there otherwise:

    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:162:24: error: 'recovery' is deprecated [-Werror,-Wdeprecated-declarations]
      162 |         m_pParserCtxt->recovery = 1 ;
          |                        ^
    /usr/include/libxml2/libxml/parser.h:377:18: note: 'recovery' has been explicitly marked deprecated here
      377 |     int recovery XML_DEPRECATED_MEMBER;
          |                  ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:209:20: error: 'nodeTab' is deprecated [-Werror,-Wdeprecated-declarations]
      209 |     m_pParserCtxt->nodeTab[m_pParserCtxt->nodeNr - 1]
          |                    ^
    /usr/include/libxml2/libxml/parser.h:284:25: note: 'nodeTab' has been explicitly marked deprecated here
      284 |     xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
          |                         ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:209:43: error: 'nodeNr' is deprecated [-Werror,-Wdeprecated-declarations]
      209 |     m_pParserCtxt->nodeTab[m_pParserCtxt->nodeNr - 1]
          |                                           ^
    /usr/include/libxml2/libxml/parser.h:280:16: note: 'nodeNr' has been explicitly marked deprecated here
      280 |     int nodeNr XML_DEPRECATED_MEMBER;
          |                ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:229:62: error: 'inputMax' is deprecated [-Werror,-Wdeprecated-declarations]
      229 |     if( m_pParserCtxt->inputTab != nullptr && m_pParserCtxt->inputMax != 0 )
          |                                                              ^
    /usr/include/libxml2/libxml/parser.h:271:18: note: 'inputMax' has been explicitly marked deprecated here
      271 |     int inputMax XML_DEPRECATED_MEMBER;
          |                  ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    4 errors generated.
    make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:338: /home/michi/development/git/libreoffice/workdir/CxxObject/xmlsecurity/source/xmlsec/saxhelper.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make: *** [Makefile:301: build] Error 2

Change-Id: I1124859c0ef766b73f506dd997d89543ccf6eb12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190668
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-09-08 15:32:08 +02:00
Michael Stahl d6409f6292 libxml2: add upstream patch for CVE-2025-7425
Change-Id: I84110fc1ed54eac4a0ce4d8b8070a031c761fb39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189104
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 88e2be781bc22f8500f57c84cec572ead8af32c4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189118
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-08-08 12:02:06 +02:00
Caolán McNamara 0441427b48 const up libxml2
Change-Id: Iba1ae303bd4cb7ba81f871968286ae890363508b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188275
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-07-24 17:38:59 +02:00
Jan Holesovsky 1cfc0d9c10 Fix macOS build after libxml2 upgrade to 2.14.3
Change-Id: I94c8fbfb150a214c7517c849336b0025813a181b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188130
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2025-07-22 08:32:19 +02:00
Xisco Fauli a64eeca841 libxml2: upgrade to 2.14.4
* 0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
has been fixed upstream

Downloaded from https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.4.tar.xz

Change-Id: Icd9ab0d96e8d9299716a16a967c424a565264d68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186601
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-17 16:12:24 +02:00
Xisco Fauli 4cfed5c6c1 libxml2: replace deprecated xmlXPathNAN
Follow-up to
commit e3b5e3aebc
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Wed Apr 23 13:38:50 2025 +0200

    libxml2: upgrade to 2.14.3

Change-Id: I02ba6c55dbf3919e811f6731bc4c081ffa6bdde2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186293
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-09 15:37:31 +02:00
Xisco Fauli feb5d010a6 libxml2: replace deprecated lastError with xmlCtxtGetLastError
Follow-up to
commit e3b5e3aebc
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Wed Apr 23 13:38:50 2025 +0200

    libxml2: upgrade to 2.14.3

Change-Id: I10acc368d9a0dd6db2f6569b2f174583d91dcf35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186285
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-06-09 11:16:37 +02:00
Xisco Fauli e3b5e3aebc libxml2: upgrade to 2.14.3
* In https://gitlab.gnome.org/GNOME/libxml2/-/commit/712a31abe458eed75f0e2a442b35af58cf7091ca
some members used by Libreoffice were marked as deprecated.
Add deprecated.patch.0 to undeprecate them for now.
Meanwhile
https://gitlab.gnome.org/GNOME/libxml2/-/issues/936#note_2461334 has been
opened to discuss it. The necessary code changes
will be addressed in a follow-up commit

* In https://gitlab.gnome.org/GNOME/libxml2/-/commit/bfe6af2eed38564693b35ac5aa60178068f34fbb
main() was moved from xmllint.c to lintmain.c.
Add makefile.msvc-entry-point.patch.0 to address that

* 0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
fixes https://gitlab.gnome.org/GNOME/libxml2/-/issues/934

* Since https://gitlab.gnome.org/GNOME/libxml2/-/commit/f070acc56400410a3ad27f4df313526749364962
android builds in Jenkins fail with "configure: error: libiconv not
found"
Run configure with --without-iconv. Same as in Windows

* Adapt testLeadingTabHTML since The HTML parser normalizes newlines
according to HTML5 now
See https://gitlab.gnome.org/GNOME/libxml2/-/issues/938#note_2463720

Downloaded from https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.3.tar.xz

Change-Id: Ie010c236f5dad5156f7f4204033d0c02928742ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184501
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-06-06 20:58:18 +02:00
Xisco Fauli 3709789a58 gbuild: set default patchlevel to 1
Change-Id: I195dbafff63e21a22edf438f5b9ed5beee4dac03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183784
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2025-04-08 09:24:08 +02:00
Xisco Fauli d500848976 libxml2: upgrade to 2.13.4
* 0001-ofz-70675-XML_ERR_FATAL-not-ending-parse.patch.0
is no longer needed. fixed upstream

Downloaded from https://download-fallback.gnome.org/sources/libxml2/2.13/libxml2-2.13.4.tar.xz

Change-Id: I7d39940ad5b197b302c57110e147aef7d2b911d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173621
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-18 22:28:46 +02:00
Caolán McNamara a5b08e3ad7 ofz#70966 use final upstream fix
Change-Id: I8423be9fdcd0c224d5d7993a4d982176c404035d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171520
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-06 11:57:12 +02:00
Caolán McNamara a81e51afcb ofz#70675 XML_ERR_FATAL not ending parse
Change-Id: I3b07ff6e208bf33053540548176a06f28138a6a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171479
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-05 15:27:12 +02:00
Xisco Fauli 6ddd8287d2 libxml2: upgrade to 2.13.3
it fixes CVE-2024-40896

Downloaded from https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.3.tar.xz

Change-Id: Icba636106cc9d1f096f5479bd80d5e30712c2e6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170975
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-07-24 20:32:17 +02:00
Xisco Fauli bff48f885e Revert "libxml2: upgrade to 2.13.1"
This reverts commit 2b27f0eb58.

Reason for revert: JunitTest_unordf_complex fails

Change-Id: I5c9b6ec454c46a737a7052cc8dd450044dd48495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169817
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-07-01 23:09:25 +02:00
Xisco Fauli 2b27f0eb58 libxml2: upgrade to 2.13.1
Building with --without-system-libxml fails with
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPScanProxy'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPClose'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPReturnCode'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPRead'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPCleanup'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPMethod'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPInit'
collect2: error: ld returned 1 exit status

so use --without-www in external/redland/ExternalProject_raptor.mk
since it seems no to be used by raptor.
Libxml2 disabled http support by default in
https://gitlab.gnome.org/GNOME/libxml2/-/commit/3018842c07e9b88d6bb0257f5644e7695cdeb2e2

Downloaded from https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.1.tar.xz

Kudos to Michael Weghorn for helping me with this patch

Change-Id: I2e41021e8aea3551eb9eec29cf12f6cd9f6ff89e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169327
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Tested-by: Jenkins
2024-06-27 02:56:14 +02:00
Michael Stahl eebdda4e22 tdf#159502 libxml2: apply Solaris ld patch only on Solaris
Diverging from upstream by inventing a LIBXML2_GLOBAL_VARIABLES version
should only be done if actually required.

Change-Id: I1520ca5078dc24ffd83e927f9c857d625e71749b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163455
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-16 10:38:28 +01:00
Caolán McNamara 6875c975f8 upgrade libxml2, libxslt & liblangtag
what I'm really after is some vexating not-reproducible oss-fuzz msan
warnings when using libxml2 in the fodt2pdf fuzzer. So lets upgrade
libxml2 to the latest, which requires bumping libxslt, and then requires
a newer liblangtag because of no longer implicit includes that it
depended on.

xmlKeepBlanksDefaultValue and xmlSubstituteEntitiesDefault are
deprecated, we should get around to updating those uses

Change-Id: I8fda0dffda0a7ea65407d246a3121875cb8ad4a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161598
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-05 11:05:36 +01:00
Caolán McNamara 0f4be83919 ofz: lots of msan spam in LLVMFuzzerCustomMutator
maybe this is that problem

Change-Id: I646a93cf815455f3eb1176df0aac5dd6641de649
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158677
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-31 11:26:18 +01:00
Stephan Bergmann 7d9b3393e2 external/libxml2: Fix missing external symbols needed by xmllint
After 5b42f148e2 "ExternalProject_libxml2 still
needs to build the xmllint executable" (which I had happened to prepare on
macOS, so didn't originally notice the issue addressed here now), Linux builds
like <https://ci.libreoffice.org/job/lo_callgrind_linux/13374/> started to fail
with

>   CCLD     xmllint
> /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: xmllint-xmllint.o: in function `testSAX':
> /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/libxml2/xmllint.c:1646: undefined reference to `xmlNewSAXParserCtxt'
> /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: xmllint-xmllint.o: in function `myReallocFunc':
> /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/libxml2/xmllint.c:357: undefined reference to `xmlMemSize'
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:1007: xmllint] Error 1
> make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/external/libxml2/ExternalProject_libxml2.mk:37: /home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/ExternalProject/libxml2/build] Error 1

Turns out that those two functions have been introduced after the previously
used libxml2 2.10.4.  No idea how things are supposed to work (given that
workdir/UnpackedTarball/libxml2/libxml2.syms starts off with "Retained for
backward compatibility. Don't add new symbols.", it appears that there should be
some other mechanism at play to make xmllint on Linux find the libxml2.so
symbols it needs, but which doesn't work as intended in our build), but just add
those two symbols to libxml2.syms for now.  (With a new version named
LIBXML2_2.11.4, even if the symbols can actually have been introduced in some
other version between 2.10.4 and 2.11.4, but who cares.)

Change-Id: Ib9d5c7901fe94b8014a87b049fc27ef5658fd954
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152292
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-26 10:45:09 +02:00
Stephan Bergmann 5b42f148e2 ExternalProject_libxml2 still needs to build the xmllint executable
No idea why fd6cbd983a "upgrade to libxml2-2.11.4"
started to only explicitly make libxml2.la (the commit message doesn't say), but
that caused at least <https://ci.libreoffice.org/job/lo_ubsan/2788/> to fail
with

> make[1]: *** Deleting file '/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/CustomTarget/sfx2/classification/example.validated'
> [build VAL] CustomTarget/sfx2/classification/example.validated
> /bin/sh: /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2//xmllint: No such file or directory
> make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_ubsan/sfx2/CustomTarget_classification.mk:20: /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/CustomTarget/sfx2/classification/example.validated] Error 1

Change-Id: I7e7aa2bae05cf8674720cfd72c78840cd7a28919
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152256
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-25 12:30:50 +02:00
Caolán McNamara fd6cbd983a upgrade to libxml2-2.11.4
'checked' field removed with:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/ce76ebfd1312459951d555ad9d87fb9a89eede55

win32 'run_debug' removed with:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/59f2f60e3eff07324f1c7cd861a444d714be750b

add libxml2-XMLCALL-redefine.patch.0 to avoid:
UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): error C2220: the following warning is treated as an error
UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): warning C4005: 'XMLCALL': macro redefinition
UnpackedTarball\expat\lib\expat_external.h(69): note: see previous definition of 'XMLCALL'

Change-Id: Ia9b1540dc1b4eccf91662c8d995c036f71de6fc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152176
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-24 15:52:03 +02:00
Michael Stahl d621a8839c libxml2: upgrade to release 2.10.2
Fixes CVE-2022-2309

Change-Id: I180218be275d3b6d38f8f74aa51c57e50d2734ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139911
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-09-14 21:35:59 +02:00
Stephan Bergmann 8785b280ea Pass $(verbose) into ExternalProject_libxml2
Change-Id: I11c7c15f4a97d3024a179fd2489fdace27f15216
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137892
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-08 08:45:41 +02:00
Luboš Luňák 1ffd6897dd try to use also proper debug LDFLAGS for externals libraries
This is basically ea68de2968 but
for LDFLAGS. A number of external libs cannot use this because
their libtool mishandles -fuse-ld.

Change-Id: Idee379eb0a3afb475b536519ee3de064b4e218f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133639
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-01 05:47:22 +02:00
Luboš Luňák ea68de2968 use gb_DEBUGINFO_FLAGS consistently in gbuild ExternalProject's
A number of them didn't use it at all, others had it hand-written
in various ways.

Change-Id: Iaf86325f9cdc032926bac917dc3eef4e34661544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132818
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12 13:57:32 +02: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
Jan-Marek Glogowski 8b9f8f0f9d libxml2: use xml2-config dummy for internal build
When building a static LO with --disable-dynloading on Linux,
--without-system-libs failed for me. And it left me really puzzled:
raptor configure failed and claimed it couldn't link libxml2.

raptor's config.log showed missing math functions. xml2-config of
LO's build is patched and it includes a -lm. The xml2-config in my
chroot doesn't. But we explicitly pass the xml2-config for
non-system-libxml2 build. Reading the configure from raptor didn't
reveal a way, that it could somehow pick up the xml2-config from
the chroot, but that code is autoconf-complex...

When running "sh -x configure", it turned out the configure script
actually picks up the LIBXML_* flags from the environment, which
are set by LO's config_host.mk. These just add -lm for Android.

So this adds a xml2-config.in "dummy", which overwrites the one
from the libxml2 source and just echos LO's LIBXML_* values and
it adds -lm for all DISABLE_DYNLOADING targets.

Change-Id: Ia713cf80c8e7dc989cf23c224e7a0f7ea1210a87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116409
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-03 00:31:31 +01:00
Caolán McNamara e9528e41b2 augment CFLAGS for libxml2 instead of overwriting
so CFLAGS containing msan's -fsanitize=memory are not discarded

Change-Id: I3a6cdbe88b1aae37a48e73d5ed7ea06e92d78f6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120683
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-19 09:55:24 +02:00
Noel Grandin a288585eca pass -enable-symbols down to libxml
Change-Id: Iceef587366bebe6007f40e100f19e6a2f048adda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116764
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-07 08:42:35 +02:00
Michael Stahl bf0c6a98ae libxml2: upgrade to release 2.9.12
Fixes:
CVE-2021-3516 CVE-2021-3517 CVE-2021-3518 CVE-2021-3537 CVE-2021-3541

* external/libxml2/ubsan.patch.0: remove, fixed upstream

Change-Id: I347dc854b862e78bde87d3e57cf5fdb584ca5673
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115913
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-05-21 15:31:22 +02:00
Jan-Marek Glogowski 8a4173987e WASM: add initial support for Emscripten cross build
- 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-05 21:14:54 +02:00
Luboš Luňák 75edcfc056 no longer force -arch:SSE on Windows
SSE2 has been pretty much a requirement for running Windows since
about 2018, so there should be ~nobody needing this.
https://lists.freedesktop.org/archives/libreoffice/2020-May/085029.html

Change-Id: I579eb92c18e42c57aa1421b889cfa7997b84915f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93558
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-07 10:58:53 +02:00
Luboš Luňák 0adc9b615f GBUILD_TRACE, support for finding out where the build time is spent
See instructions in solenv/gbuild/Trace.mk . This generates a file than
can be viewed e.g. in the Chromium tracing view.

Change-Id: I5f90647c58ca729375525b6daed2d4918adc8188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88754
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-16 14:49:45 +01:00
Juergen Funk 52292c374c Optionally generate PDB for libxml.dll
Change-Id: I58f762fa134052e2a7b4a5c7206b4b75df5c1e69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88156
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-08 18:08:51 +01:00
Michael Stahl d1bf39a78e libxml2: upgrade to release 2.9.10
... which is, surprisingly enough, required to build the latest libxslt.

Change-Id: Ifbb36ed61b8f68185f9c788f63a8edeb58899f94
Reviewed-on: https://gerrit.libreoffice.org/83311
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-11-20 18:47:53 +01:00
Stephan Bergmann 79e15d33c8 external/libxml2: Simplify UBSan nullptr-with-offset fix
...that had been added with fcb2d8a87a
"external/libxml2: Avoid UBSan nullptr-with-offset"

Change-Id: I7ee234c8c6a868ed825a8ed3fa0dcdc69decb7ba
Reviewed-on: https://gerrit.libreoffice.org/81299
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22 11:06:12 +02:00
Stephan Bergmann fcb2d8a87a external/libxml2: Avoid UBSan nullptr-with-offset
...(new with Clang 10 trunk), where adding even an offset of 0 to a null pointer
is UB in C.  Seen when building UIConfig_modules/schart:

> [UIL] chart2/uiconfig/ui/3dviewdialog
> xpath.c:14532:5: runtime error: applying zero offset to null pointer
>  #0 in xmlXPathTryStreamCompile at workdir/UnpackedTarball/libxml2/xpath.c:14532:5
>  #1 in xmlXPathCtxtCompile__internal_alias at workdir/UnpackedTarball/libxml2/xpath.c:14634:12
>  #2 in xsltXPathCompileFlags at workdir/UnpackedTarball/libxslt/libxslt/xsltutils.c:2323:11
>  #3 in xsltValueOfComp at workdir/UnpackedTarball/libxslt/libxslt/preproc.c:1258:18
>  #4 in xsltStylePreCompute at workdir/UnpackedTarball/libxslt/libxslt/preproc.c:2225:6
>  #5 in xsltParseTemplateContent at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:4916:13
>  #6 in xsltParseStylesheetTemplate at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:5467:5
>  #7 in xsltParseStylesheetTop at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6205:6
>  #8 in xsltParseStylesheetProcess at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6461:2
>  #9 in xsltParseStylesheetImportedDoc at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6675:9
>  #10 in xsltParseStylesheetDoc at workdir/UnpackedTarball/libxslt/libxslt/xslt.c:6714:11
>  #11 in main at workdir/UnpackedTarball/libxslt/xsltproc/xsltproc.c:888:9

Change-Id: I016ca8d24315385bcfeafca56dda44d9be10f517
Reviewed-on: https://gerrit.libreoffice.org/81285
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-22 07:19:45 +02:00
Michael Stahl beea585272 libxml2: upgrade to release 2.9.9
* fixes CVE-2018-14404
* drop one hunk from libxml2-android.patch that was added in commit
  6a17d2f2ba7acfec277314b97b50e41532d6b44d; presumably nan() exists now
  given that other code is calling it.

Change-Id: I696cc4e1da55536ea1c89a6e0446ce5bc8398ba4
Reviewed-on: https://gerrit.libreoffice.org/66308
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-01-15 10:35:28 +01:00
Michael Stahl f775b5427b libxml2: upgrade to release 2.9.8
Change-Id: Ic6802c16b740f6aee59ae2f74b7edcd37461f1f3
Reviewed-on: https://gerrit.libreoffice.org/50835
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-06 18:48:10 +01:00
David Tardon 3ab270242e upload libxml2 2.9.7
Change-Id: I3f72ec938c87e0c0d30a91b32d96fedf5379207f
Reviewed-on: https://gerrit.libreoffice.org/44423
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-11-08 09:14:06 +01:00
Michael Stahl 4fcdc190af external: consistently use gb_ExternalProject_use_nmake
... instead of hard-coding some subset of the variables everywhere.

Change-Id: I5eac5663563ee9d6cb7b57f5f6e9d55560587276
Reviewed-on: https://gerrit.libreoffice.org/44167
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-11-01 19:52:53 +01:00
David Tardon a0439f5a5b upload libxml2 2.9.6
Change-Id: Iafb9d9e2459451d213cad5d9141755df999d7ced
Reviewed-on: https://gerrit.libreoffice.org/43306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-10-10 12:54:05 +02:00
David Tardon 1bae5c02ef use gbuild way to update config.*, continued
Change-Id: I9abf1742c213f47c576ffbb7dafd33087f7037e5
Reviewed-on: https://gerrit.libreoffice.org/43307
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-10-10 12:53:45 +02:00
Michael Stahl 84b0f06315 consistent naming of externals: xml2 -> libxml2
Change-Id: Ia1164c70d02dce70cb346c1fd4033f12d91c6e5d
Reviewed-on: https://gerrit.libreoffice.org/42297
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-09-15 11:03:05 +02:00