Bug 265128 - Build fails with libxml2 version 2.12.0 due to API change
Summary: Build fails with libxml2 version 2.12.0 due to API change
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-20 05:54 PST by Adrian Perez
Modified: 2023-11-20 07:44 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2023-11-20 05:54:18 PST
The following commit made it into 2.12.0 and changed the const-ness of
xmlError pointers:

  https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711

...which results in the following build failure:

  In file included from /app/webkit/WebKitBuild/GTK/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-42f7b70e-4.cpp:6:
  /app/webkit/Source/WebCore/xml/XSLTProcessorLibxslt.cpp:131:9: error: no matching function for call to 'xmlSetStructuredErrorFunc'
          xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/include/libxml2/libxml/xmlerror.h:871:5: note: candidate function not viable: no known conversion from 'void (void *, const xmlError *)' (aka 'void (void *, const _xmlError *)') to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, _xmlError *)') for 2nd argument
      xmlSetStructuredErrorFunc   (void *ctx,
      ^

I have reported the bug upstream, but the developer replied that the change
is intentional, so we need to handle the difference inside WebKit.
Comment 1 Adrian Perez 2023-11-20 05:54:49 PST
Upstream bug: https://gitlab.gnome.org/GNOME/libxml2/-/issues/622
Comment 2 Adrian Perez 2023-11-20 05:58:59 PST
Pull request: https://github.com/WebKit/WebKit/pull/20741
Comment 3 EWS 2023-11-20 07:43:57 PST
Committed 270977@main (1bad176b2496): <https://commits.webkit.org/270977@main>

Reviewed commits have been landed. Closing PR #20741 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-11-20 07:44:13 PST
<rdar://problem/118653269>