Skip to content

Conversation

@zerocom38
Copy link
Contributor

Issue

With the latest update of libxml2 for Windows (vcpkg) to version 2.14.5, the include path has been moved to a libxml2 subdirectory.

Fix

If a libxml2 subdirectory exists, switch to it. Otherwise, stay with the original include path.

Note

The latest cargo fmt applied some format changes.

@dginev
Copy link
Member

dginev commented Sep 1, 2025

Thank you for the contribution!

Is there a way to induce the new Windows behavior in our Github CI? It would be nice to see the previous version fail and this one pass, to be sure the problem is addressed.

I can do that too since you've disclosed the version, but it will take me a while.

@zerocom38
Copy link
Contributor Author

I opened up an issue in vcpkg repo, if the subdirectory is expected or not: microsoft/vcpkg#47155

@zerocom38
Copy link
Contributor Author

Thank you for the contribution!

Is there a way to induce the new Windows behavior in our Github CI? It would be nice to see the previous version fail and this one pass, to be sure the problem is addressed.

I can do that too since you've disclosed the version, but it will take me a while.

I'll check that.

@zerocom38
Copy link
Contributor Author

zerocom38 commented Sep 2, 2025

I did a lot of research. vcpkg recommends using cmake or pkg-config and not relying on the main include path. pkg-config is not available on Windows by default, so better not use it. The libxml2 includes seem to be in a libxml2 subdirectory on other platforms too (e.g Debian Linux). So I added the subdirectory to the include of vcpkg too. Even older versions of the vcpkg repo have the libxml2 subdirectory.

@zerocom38
Copy link
Contributor Author

zerocom38 commented Sep 24, 2025

@dginev Can we go ahead and merge this PR? There's still an ongoing discussion at vcpkg, but my change is just compatible with all versions. Right now, I cannot use the latest vcpkg version, because the libxml crate doesn't compile anymore.

@dginev dginev merged commit 49ee6eb into KWARC:master Sep 25, 2025
7 checks passed
@dginev
Copy link
Member

dginev commented Sep 25, 2025

Looks good, thanks

@dginev dginev mentioned this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants