-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
vcpkg claims that libxml2 2.11.9 is not compatible with 2.7.4 #42315
Comments
FTR in vcpkg, the exported cmake config is used to resolve You can try to pass a version range to |
This issue is specific to vcpkg though. If I install
Does Specifying a version range doesn't work, unfortunately. When using vcpkg, this happens:
When installing
|
@nwellnhof, any comments on this? |
Yes, it appears that CMake has a built-in Find Module for Is the |
Yes, because of using CMake config even when you don't ask for it.
Vcpkg doesn't use it. Find modules poorly support transitive usage requirements, in particular when subject to configuration. Often they fail also on multi-config setup. Users which do single-config dynamic-linkage Linux or macOS usually don't notice these limitations. They are real nevertheless. I still wonder if the port should be fixed at all as long as upstream says "same version". |
Let's wait for a response from the upstream developer, whom I pinged above. The requirement is strange and it seems inconsistent with the compatibility that |
I'm not really a CMake expert and I have no idea. You'd have to ask Markus Rickert who contributed initial CMake support here: https://gitlab.gnome.org/GNOME/libxml2/-/commit/2a2c38f3 Feel free to open a libxml2 issue. |
Personally, I had no idea that in config mode the package may override the default behaviour of |
For now, I simply want to know libxml2's official policy on versioning and (source level) compatibility. |
The official policy is |
Is the official policy the same for libxslt? |
Describe the bug
vcpkg claims that libxml2 2.11.9 is not compatible with 2.7.4, which is incorrect.
find_package(LibXml2 2.7.4)
results in the following output:I noticed this issue in the igraph CI tests. This is how igraph looks for
libxml2
:https://github.com/igraph/igraph/blob/e940ab737938dfdd4518164c866b2599af40856f/etc/cmake/dependencies.cmake#L74
With debug output:
https://github.com/igraph/igraph/blob/9036af6b96b266bb72fa9b41f52e8e124b44d58b/etc/cmake/dependencies.cmake#L76-L77
Link to CI test issue:
https://dev.azure.com/igraph-team/igraph/_build/results?buildId=8240&view=logs&j=dc2fa7f2-c2a5-5af8-ba1c-9621505790a7&t=dcba228e-5c56-53e5-8cff-603ef5cc76bd&l=323
Environment
OS: Windows
Compiler: VS 2022 v17.12.0, current
windows-latest
on AzureOS: macOS 14.7
Compiler: Apple Clang 16.0
CMake 3.31 on both.
To Reproduce
I cannot reproduce this issue with a libxml2 that is installed separately from vcpkg.
On macOS, here's a small project file to reproduce:
Then use
I am not able to test on Windows directly.
Expected behavior
I expect version 2.11.x to be accepted when looking for version 2.7.4. But in fact it fails when looking for any version that is not of the form 2.11.x (this includes 2.10.0 or 2.12.0).
This is what I expect, and what I see with a
libxml2
that is not installed with vcpkg:Failure logs
—
Additional context
—
CC @ntamas
The text was updated successfully, but these errors were encountered: