Files
odfstudio/xmlsecurity/source
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
..