Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libxml2] Update to v2.13.5 #42528

Merged
merged 4 commits into from
Dec 12, 2024
Merged

Conversation

donny-dont
Copy link
Contributor

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@donny-dont donny-dont marked this pull request as draft December 4, 2024 19:51
@donny-dont donny-dont marked this pull request as ready for review December 5, 2024 00:10
@jimwang118
Copy link
Contributor

Update PR 39478 already exists.

@LilyWangLL LilyWangLL added the category:port-update The issue is with a library, which is requesting update new revision label Dec 5, 2024
@donny-dont
Copy link
Contributor Author

Update PR 39478 already exists.

👋 @jimwang118 I’ve been trying to replace our custom registry at https://github.com/WebKitForWindows/WebKitRequirements with the canonical registry. Then I plan on integrating vcpkg into the build of WebKit.

I saw your PR but it seemed like you were having trouble with it. I have experience with building libxml2 and libxslt so that’s why I landed an update of the later in 21692b2 .

Comparing our two PRs I can see that it’s carrying over some stuff that’s obsolete. Like the pkgconfig specific changes. You can see they added stuff at https://github.com/GNOME/libxml2/blob/fe1ee0f25f43e33a9981fd6fe7b0483a8c8b5e8d/CMakeLists.txt#L385 which does the _LIBS changes. There’s also some commits added since the last release that obsolete some changes in that diff see https://github.com/GNOME/libxml2/commits/2.13/ .

There are also a number of build options that aren’t exposed in the feature listing that I was planning on adding to the vcpkg.json.

Apologies for not doing a thorough review of your PR making the above points. It’s after work hours for me and it’s hard to do a review through a phone.

@BillyONeal
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal
Copy link
Member

I reran the build to workaround a company-wide authentication issue that broke the first run but the failures now look legitimate:

/Users/vcpkg/Data/b/librsvg/src/librsvg-2-a2e28f96fe.clean/rsvg-css.c:866:20: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types]
    handler.serror = rsvg_xml_noerror;
                   ^ ~~~~~~~~~~~~~~~~
1 warning and 1 error generated.

It seems likely that rsvg_xml_noerror needs to be patched to have a different signature due to changes in libxml2?

@donny-dont
Copy link
Contributor Author

I reran the build to workaround a company-wide authentication issue that broke the first run but the failures now look legitimate:

/Users/vcpkg/Data/b/librsvg/src/librsvg-2-a2e28f96fe.clean/rsvg-css.c:866:20: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types]
    handler.serror = rsvg_xml_noerror;
                   ^ ~~~~~~~~~~~~~~~~
1 warning and 1 error generated.

It seems likely that rsvg_xml_noerror needs to be patched to have a different signature due to changes in libxml2?

Yea I think the changes to that port from #39478 need to be integrated. Will give that a go and add @jimwang118 as a co-author.

@donny-dont
Copy link
Contributor Author

Alrighty added and credited @jimwang118 for his work. 🤞 were 🟢 and this can land

@donny-dont donny-dont force-pushed the libxml2-2.13.5 branch 2 times, most recently from 94fe87b to 94bd8ff Compare December 7, 2024 01:27
ports/libxml2/portfile.cmake Outdated Show resolved Hide resolved
donny-dont and others added 2 commits December 9, 2024 11:11
Also update librsvg version to 2.40.21 and fix the build with the newer lixml2.

Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
@LilyWangLL
Copy link
Contributor

All features passed with following triplets:

x86-windows
x64-windows
x64-windows-static

Usage test passed on x64-windows.

@LilyWangLL LilyWangLL added the info:reviewed Pull Request changes follow basic guidelines label Dec 11, 2024
@JavierMatosD JavierMatosD merged commit 0e49ef4 into microsoft:master Dec 12, 2024
17 checks passed
@nirvn
Copy link
Contributor

nirvn commented Dec 14, 2024

@donny-dont , I think this might have led to build failure on iOS, with the following error:

[3/46] /Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DLIBXML_STATIC -DSYSCONFDIR="/Users/runner/builddir/_deps/vcpkg-src/packages/libxml2_arm64-ios/etc" -I/Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/arm64-ios-rel -I/Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/src/v2.13.5-a978bfa150.clean/include -isystem /Users/runner/builddir/vcpkg_installed/arm64-ios/include -fPIC -fvisibility=hidden -g -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wno-format-extra-args -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -miphoneos-version-min=14.0 -fPIC -MD -MT CMakeFiles/LibXml2.dir/dict.c.o -MF CMakeFiles/LibXml2.dir/dict.c.o.d -o CMakeFiles/LibXml2.dir/dict.c.o -c /Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/src/v2.13.5-a978bfa150.clean/dict.c
FAILED: CMakeFiles/LibXml2.dir/dict.c.o
/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DLIBXML_STATIC -DSYSCONFDIR="/Users/runner/builddir/_deps/vcpkg-src/packages/libxml2_arm64-ios/etc" -I/Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/arm64-ios-rel -I/Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/src/v2.13.5-a978bfa150.clean/include -isystem /Users/runner/builddir/vcpkg_installed/arm64-ios/include -fPIC -fvisibility=hidden -g -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wno-format-extra-args -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -miphoneos-version-min=14.0 -fPIC -MD -MT CMakeFiles/LibXml2.dir/dict.c.o -MF CMakeFiles/LibXml2.dir/dict.c.o.d -o CMakeFiles/LibXml2.dir/dict.c.o -c /Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/src/v2.13.5-a978bfa150.clean/dict.c
/Users/runner/builddir/_deps/vcpkg-src/buildtrees/libxml2/src/v2.13.5-a978bfa150.clean/dict.c:970:17: error: call to undeclared function 'getentropy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (getentropy(globalRngState, sizeof(globalRngState)) == 0)
^
1 error generated.

@dg0yt
Copy link
Contributor

dg0yt commented Dec 14, 2024

IMO this is an upstream issue then. IIUC iOS doesn't have getentropy. The offending call is guarded with HAVE_DECL_GETENTROPY. So something goes wrong at configuration/detection of HAVE_DECL_GETENTROPY.

@nirvn
Copy link
Contributor

nirvn commented Dec 14, 2024

@dg0yt , most likely yes, see this commit (https://gitlab.gnome.org/GNOME/libxml2/-/commit/e1657f3f272e87577aaf0c77aa040609394a0312).

The commit itself doesn't apply against 2.13.5; I've manually backported the commit into a patch locally and if that is successful I'll upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants