Skip to content

[vcpkg] Update CMake to 3.25.1#28126

Closed
mrowrpurr wants to merge 5 commits intomicrosoft:masterfrom
mrowrpurr:cmake-3.25.1
Closed

[vcpkg] Update CMake to 3.25.1#28126
mrowrpurr wants to merge 5 commits intomicrosoft:masterfrom
mrowrpurr:cmake-3.25.1

Conversation

@mrowrpurr
Copy link
Copy Markdown

The recent PR #28012 broke my application builds due to https://gitlab.kitware.com/cmake/cmake/-/issues/24209

https://gitlab.kitware.com/cmake/cmake/-/issues/24209
PCH compilations fails on VC++/Ninja if CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP=1

^ The issue shows how easy it is to reproduce this issue on CMake 3.25.0 using target_precompile_headers


Uncertain of the process for bumping CMake, simply based this PR on #28012 from a few days ago.

Feel free to close if there's an internal process for doing this and y'all will do it. But please get to 3.25.1 soon!

@mrowrpurr
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@JonLiu1993 JonLiu1993 added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Dec 5, 2022
JonLiu1993
JonLiu1993 previously approved these changes Dec 5, 2022
@mrowrpurr
Copy link
Copy Markdown
Author

@JonLiu1993 The x86 build has been running and stuck for over a day 😅 Can it be restarted?

@Neumann-A
Copy link
Copy Markdown
Contributor

@mrowrpurr Just sync the branch with master via github. It will automatically restart then

@mrowrpurr
Copy link
Copy Markdown
Author

@JonLiu1993 ping to un-stuck-ify. Triggered fresh build with a pull from master but, as a first time contributor, looks like it needs another manual approval to run the builds

github-actions[bot]
github-actions bot previously approved these changes Dec 8, 2022
@JonLiu1993
Copy link
Copy Markdown
Contributor

@JonLiu1993 ping to un-stuck-ify. Triggered fresh build with a pull from master but, as a first time contributor, looks like it needs another manual approval to run the builds

@mrowrpurr, Thanks for your pr, I always keep an eye on this PR.

@JonLiu1993
Copy link
Copy Markdown
Contributor

The ci error will be fixed by #28089

@JonLiu1993 JonLiu1993 added the depends:different-pr This PR or Issue depends on a PR which has been filed label Dec 9, 2022
@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Dec 9, 2022

The ci error will be fixed by #28089

No, the actual fix is #28160.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Dec 9, 2022

Given that the CMake update nearly rebuilds the world, can we integrate another change with the next push?

Please update

vcpkg_minimum_required(VERSION 2021-11-02)

This should be bumped to 2022-10-12 to generally enable the use of ${VERSION} in portfiles.
Cf. #28240 (comment), cc @Neumann-A

@mrowrpurr
Copy link
Copy Markdown
Author

@dg0yt Bumped

fda3307

- vcpkg_minimum_required(VERSION 2021-11-02)
+ vcpkg_minimum_required(VERSION 2022-10-12)

@mrowrpurr
Copy link
Copy Markdown
Author

@dg0yt My bad if I should've waited for #28160 before "rebuilding the world" 🌍

@Neumann-A
Copy link
Copy Markdown
Contributor

Consider syncing with master again. Maybe the CI run gets lucky and skips the problem ;)

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Dec 14, 2022

CI won't get happy if the baseline fixes are not merged.
IMO this PR could be merged despite the well-known baseline regressions.

@Neumann-A
Copy link
Copy Markdown
Contributor

CI won't get happy if the baseline fixes are not merged.

That is only true for full rebuilds not partial rebuilds ;)

IMO this PR could be merged despite the well-known baseline regressions.

Yeah I agree with that.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Dec 14, 2022

CI won't get happy if the baseline fixes are not merged.

That is only true for full rebuilds not partial rebuilds ;)

A CMake update is not so much different from a full rebuild. That's why this PR is affected by the baseline regressions.
(Well, at least we skip the known failures.)

@Neumann-A
Copy link
Copy Markdown
Contributor

A CMake update is not so much different from a full rebuild.

A CMake update is always a full rebuild in the first run. After that it should just be partial rebuilds.

@mrowrpurr
Copy link
Copy Markdown
Author

@JonLiu1993 I can sync to HEAD anytime again as needed (although I think you can do it too)

Any way to get movement here?

This is breaking my projects for everyone who doesn't manually install CMake 3.25.1 into their PATH because of the 3.25.0 PCH bug. Could we please find a way to merge this?

@JonLiu1993
Copy link
Copy Markdown
Contributor

@JonLiu1993 I can sync to HEAD anytime again as needed (although I think you can do it too)

Any way to get movement here?

This is breaking my projects for everyone who doesn't manually install CMake 3.25.1 into their PATH because of the 3.25.0 PCH bug. Could we please find a way to merge this?

The strange thing is that I can't reproduce the error on ci locally. I'm thinking whether we can temporarily fail the triplet that reported the error in ci in cibaseline to bypass these errors. But this operation may obviously be dangerous or incorrect, I need to discuss it with my colleagues.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Jan 3, 2023

Port protobuf installs libprotobuf.lib, but libphonenumer looks for protobuf, #28522 (comment).

libphonenumber builds with CMake 3.25.0 due to a temporary behaviour which was reverted in CMake 3.25.1:
Trying the lib name prefix when searching for libs on Windows,
Kitware/CMake@4c2952c

Possible fix: patch https://github.com/google/libphonenumber/blob/9741ae82fdf85e12d40e9d1f78632378c4e0f885/cpp/CMakeLists.txt#L59

+  set(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
  find_library (${NAME}_LIB NAMES ${LIBRARY})

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Jan 4, 2023

+  set(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
  find_library (${NAME}_LIB NAMES ${LIBRARY})

To not interfere, with default order, guard with if(MSVC) or use
set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};lib")

@JonLiu1993 JonLiu1993 added requires:author-response and removed depends:different-pr This PR or Issue depends on a PR which has been filed labels Jan 4, 2023
@mrowrpurr
Copy link
Copy Markdown
Author

@dg0yt @JonLiu1993

Could I get some guidance? I see requires: author-response added.

Is that a response of the libphonenumber port author or from myself?

@dg0yt's patch helps google/libphonenumber which had a PR merged a couple days ago:
google/libphonenumber#2818 "CPP: Fix cmake build failure + export libphonenumber-config.cmake"

I don't think y'all need me for anything, in which case, "as you were." Just poking.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Jan 7, 2023

I don't think you need to continue this PR: There is #28522.
Unfortunately, new regressions are merged faster than fixes.

@JonLiu1993
Copy link
Copy Markdown
Contributor

@mrowrpurr, thanks for your contribution. this PR duplicate of #28522.
can we close this PR and continue tracking progress in another PR?

@mrowrpurr
Copy link
Copy Markdown
Author

#28522 was merged (which was a duplicate of this one)

@mrowrpurr mrowrpurr closed this Jan 15, 2023
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants