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

Mitigate FindPkgConfig.cmake framework handling bug #35893

Closed
wants to merge 2 commits into from

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Dec 27, 2023

Fix frameworks incorrectly appearing in link options on repeated CMake configuration runs. The problem doesn't show when building ports (a single CMake run) but in user projects.
The ultimate fix must be in CMake, but vcpkg users are affected now. A CMake version check can be added in the future.

Resolves #35859.
Resolves #35137.

This change doesn't affect ABI hashes / binary caching. i.e. no world rebuild in CI, unless such a build is triggered in another way.

Upstream MR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9109

@Cheney-W Cheney-W added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Dec 28, 2023
@dg0yt
Copy link
Contributor Author

dg0yt commented Jan 4, 2024

The fixup may need to consider that Kitware doesn't really want these variables to be cache variables.
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9109#note_1464882

@dg0yt
Copy link
Contributor Author

dg0yt commented Jan 5, 2024

Upstream accepts pushing the local variables to the cache for now, and this is what this PR implements for currently used releases of CMake.

@dg0yt dg0yt marked this pull request as ready for review January 8, 2024 05:54
@Cheney-W Cheney-W added the info:reviewed Pull Request changes follow basic guidelines label Jan 8, 2024
@JavierMatosD JavierMatosD added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Jan 8, 2024
@JavierMatosD
Copy link
Contributor

@dg0yt, Since this issue impacts macOS users, we recommend addressing it directly with Homebrew rather than backporting the fix here.

Our understanding is that this bug has been resolved in CMake version 3.29, which is yet to be officially released. In the meantime, for those who need an immediate solution, you can access the nightly builds of CMake through this link. These builds should include the fix, and you can use them until Homebrew updates their repository to include CMake 3.29.

@dg0yt dg0yt deleted the pkg branch April 26, 2024 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly info:reviewed Pull Request changes follow basic guidelines requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libslirp] Building a project that links libslirp more than once fails on macOS [cairo] Link error on macOS
3 participants