Compilation of 7.6.3.2 release fails with libxml2 2.12.0: /builddir/build/BUILD/libreoffice-7.6.3.2/sax/source/fastparser/fastparser.cxx: In function ‘rtl::OUString {anonymous}::lclGetErrorMessage(xmlParserCtxtPtr, std::u16string_view, sal_Int32)’: /builddir/build/BUILD/libreoffice-7.6.3.2/sax/source/fastparser/fastparser.cxx:582:44: error: invalid conversion from ‘const xmlError*’ {aka ‘const _xmlError*’} to ‘xmlErrorPtr’ {aka ‘_xmlError*’} [-fpermissive] 582 | xmlErrorPtr error = xmlCtxtGetLastError( ctxt ); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ | | | const xmlError* {aka const _xmlError*} S=/builddir/build/BUILD/libreoffice-7.6.3.2 && I=$S/instdir && W=$S/workdir && readelf -d $I/program/libuno_purpenvhelpergcc3.so.3 | grep SONAME > $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports.tmp; gcc-nm --dynamic --extern-only --defined-only --format=posix $I/program/libuno_purpenvhelpergcc3.so.3 | cut -d' ' -f1-2 >> $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports.tmp && if cmp -s $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports.tmp $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports; then rm $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports.tmp; else mv $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports.tmp $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports && touch -r $I/program/libuno_purpenvhelpergcc3.so.3 $W/LinkTarget/Library/libuno_purpenvhelpergcc3.so.3.exports; fi S=/builddir/build/BUILD/libreoffice-7.6.3.2 && I=$S/instdir && W=$S/workdir && readelf -d $I/program/libxmlreaderlo.so | grep SONAME > $W/LinkTarget/Library/libxmlreaderlo.so.exports.tmp; gcc-nm --dynamic --extern-only --defined-only --format=posix $I/program/libxmlreaderlo.so | cut -d' ' -f1-2 >> $W/LinkTarget/Library/libxmlreaderlo.so.exports.tmp && if cmp -s $W/LinkTarget/Library/libxmlreaderlo.so.exports.tmp $W/LinkTarget/Library/libxmlreaderlo.so.exports; then rm $W/LinkTarget/Library/libxmlreaderlo.so.exports.tmp; else mv $W/LinkTarget/Library/libxmlreaderlo.so.exports.tmp $W/LinkTarget/Library/libxmlreaderlo.so.exports && touch -r $I/program/libxmlreaderlo.so $W/LinkTarget/Library/libxmlreaderlo.so.exports; fi /builddir/build/BUILD/libreoffice-7.6.3.2/helpcompiler/source/HelpLinker.cxx: In function ‘bool compileExtensionHelp(const rtl::OUString&, std::u16string_view, std::u16string_view, sal_Int32, const rtl::OUString*, std::u16string_view, HelpProcessingErrorInfo&)’: /builddir/build/BUILD/libreoffice-7.6.3.2/helpcompiler/source/HelpLinker.cxx:879:41: error: invalid conversion from ‘void (*)(void*, xmlErrorPtr)’ {aka ‘void (*)(void*, _xmlError*)’} to ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void*, const _xmlError*)’} [-fpermissive] 879 | xmlSetStructuredErrorFunc( nullptr, StructuredXMLErrorFunction ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | | | void (*)(void*, xmlErrorPtr) {aka void (*)(void*, _xmlError*)} In file included from /usr/include/libxml2/libxml/valid.h:15, from /usr/include/libxml2/libxml/parser.h:17, from /builddir/build/BUILD/libreoffice-7.6.3.2/helpcompiler/inc/HelpCompiler.hxx:30, from /builddir/build/BUILD/libreoffice-7.6.3.2/helpcompiler/source/HelpLinker.cxx:20: /usr/include/libxml2/libxml/xmlerror.h:898:57: note: initializing argument 2 of ‘void xmlSetStructuredErrorFunc(void*, xmlStructuredErrorFunc)’ 898 | xmlStructuredErrorFunc handler); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Created attachment 191050 [details] libxml2 fixes patch Two of our users at Linux From Scratch have developed a patch to fix this problem. It applies a patch to a few external tarballs and then includes some changes for Libreoffice's source code itself. The patch has been tested on Libreoffice 7.6.3.2 and libxml2-2.12.1.
Oh, I see the description of the bug, then prepared https://gerrit.libreoffice.org/c/core/+/159980 to fix this on master. In the meantime comment 1 appeared. :-) The gerrit one just fixes the system-libs case, which is probably what the description mentions. Douglas: I see xmlsec upstream already has fixes merged; could you please submit the cmis and langtag fixes to the upstream projects? In the meantime, let me take this bug for the libreoffice piece.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb tdf#158302 fix build against system-libxml-2.12 It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Fixed on master. Gwyn: could you confirm that the problem you see is fixed if you pick the above patch to your 7.6 build?
I had to refactor one piece of the patch to apply to 7.6.3.2, and it still fails: https://kojipkgs.fedoraproject.org//work/tasks/2557/109622557/build.log
The patch applied well here (Arch) against 7.6.3.2 without modifications and build finished against systemd libxml2 (2.12.1) and libxslt.
(In reply to Gwyn Ciesla from comment #5) > I had to refactor one piece of the patch to apply to 7.6.3.2, and it still > fails: > > https://kojipkgs.fedoraproject.org//work/tasks/2557/109622557/build.log Could you please file a follow-up bug for CppunitTest_unoxml_domtest failing with libxml-2.12? That needs further investigation, it's something deeper, not just a build failure. Thanks.
Done, thanks! https://bugs.documentfoundation.org/show_bug.cgi?id=158423
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/764890a53cea2ccb6d2fb6d8c7edb5e1c91ecdc0 tdf#158302 fix build against system-libxml-2.12 It will be available in 7.6.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Commit Notification from comment #9) > Miklos Vajna committed a patch related to this issue. > It has been pushed to "libreoffice-7-6": > > https://git.libreoffice.org/core/commit/https://geometry-dash-online.com > 764890a53cea2ccb6d2fb6d8c7edb5e1c91ecdc0 > > tdf#158302 fix build against system-libxml-2.12 > > It will be available in 7.6.5. > > The patch should be included in the daily builds available at > https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More > information about daily builds can be found at: > https://wiki.documentfoundation.org/Testing_Daily_Builds > > Affected users are encouraged to test the fix and report feedback. Thanks for the answer.