Update to CMake 3.31.10#48250
Conversation
|
#44273 for cmake 4 probably needs to be updated and rerun |
|
FTR vcpkg is used with CMake 4. The key enabler was Lines 6 to 8 in e93bf57 |
Oh good to know. Seems this change was not meaningful, that it was nowhere mentioned in the release of 2025.04.09 😅 Tried it now locally and yeah it works indeed with CMake 4.2 👍 @Neumann-A Well it seems the GitHub search really still sucks, that it still doesn't favor PRs that also have the search term in the PR title and not scattered across multiple comments. How long do you think your PR would take? If you say it will be a while before you have time to get it done, I would suggest taking this intermediate step here, otherwise we can skip it. |
|
The PS C:\Dev\vcpkg> .\vcpkg.exe install vcpkg-from-git-test --overlay-ports scripts/test_ports
Computing installation plan...
The following packages will be built and installed:
vcpkg-from-git-test:x64-windows@0 -- C:\Dev\vcpkg\scripts/test_ports\vcpkg-from-git-test
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\bion\AppData\Local\vcpkg\archives in 271 us. Use --debug to see more details.
Installing 1/1 vcpkg-from-git-test:x64-windows@0...
Building vcpkg-from-git-test:x64-windows@0...
C:\Dev\vcpkg\scripts/test_ports\vcpkg-from-git-test: info: installing overlay port from here
-- Creating test git repository
-- Testing regular mode
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo f0bd394394c4a6d4b1bd6266ab78d5bb127efd60...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0bd394394c4a6d4b1bd6266ab78d5bb127efd60.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/bb127efd60-edba28ab97.clean
-- Testing regular mode that happens to match HEAD
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo ed1040cf148c1a7fc82de6724fb7ab036a663b62...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-ed1040cf148c1a7fc82de6724fb7ab036a663b62.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/036a663b62-a9514879a8.clean
-- Testing regular mode with FETCH_REF
-- Using cached C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0bd394394c4a6d4b1bd6266ab78d5bb127efd60.tar.gz
-- Cleaning sources at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/bb127efd60-edba28ab97.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0bd394394c4a6d4b1bd6266ab78d5bb127efd60.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/bb127efd60-edba28ab97.clean
-- Testing regular mode with FETCH_REF that happens to match HEAD
-- Using cached C:/Dev/vcpkg-downloads/vcpkg-from-git-test-ed1040cf148c1a7fc82de6724fb7ab036a663b62.tar.gz
-- Cleaning sources at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/036a663b62-a9514879a8.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-ed1040cf148c1a7fc82de6724fb7ab036a663b62.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/036a663b62-a9514879a8.clean
-- Testing head mode
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo main...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-main.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/main-a9514879a8.clean
-- Testing head mode + no HEAD_REF -> just uses REF
-- Package does not specify HEAD_REF. Falling back to non-HEAD version.
-- Using cached C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0bd394394c4a6d4b1bd6266ab78d5bb127efd60.tar.gz
-- Cleaning sources at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/bb127efd60-edba28ab97.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0bd394394c4a6d4b1bd6266ab78d5bb127efd60.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/bb127efd60-edba28ab97.clean
-- Testing new head ref
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo main...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-main.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/main-a7748295ad.clean
-- Testing LFS support
-- Testing fetching with the same Git and LFS urls
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo 6ec281fbd8fbe9f8fd7368e65fe130b0ebfce247...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
Command failed: "C:/Program Files/Git/cmd/git.exe" -c core.autocrlf=false archive 6ec281fbd8fbe9f8fd7368e65fe130b0ebfce247 -o C:/Dev/vcpkg-downloads/temp/vcpkg-from-git-test-6ec281fbd8fbe9f8fd7368e65fe130b0ebfce247.tar.gz
Working Directory: C:/Dev/vcpkg-downloads/git-tmp
Error code: 128
See logs for more information:
C:\Dev\vcpkg\buildtrees\vcpkg-from-git-test\git-archive-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_from_git.cmake:167 (vcpkg_execute_required_process)
scripts/test_ports/vcpkg-from-git-test/portfile.cmake:284 (vcpkg_from_git)
scripts/ports.cmake:206 (include)
error: building vcpkg-from-git-test:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle vcpkg-from-git-test:x64-windows: 6.3 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+vcpkg-from-git-test
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=%5Bvcpkg-from-git-test%5D%20build%20error%20on%20x64-windows&body=Copy%20issue%20body%20from%20C%3A%2FDev%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
You can also submit an issue by running (GitHub CLI must be installed):
"C:\Program Files\GitHub CLI\gh.exe" issue create -R microsoft/vcpkg --title "[vcpkg-from-git-test] Build failure on x64-windows" --body-file C:/Dev/vcpkg/installed/vcpkg/issue_body.md
PS C:\Dev\vcpkg> .\vcpkg.exe fetch cmake
C:\Program Files\CMake\bin\cmake.exe
PS C:\Dev\vcpkg> & "C:\Program Files\CMake\bin\cmake.exe" --version
cmake version 4.1.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
PS C:\Dev\vcpkg> $env:VCPKG_FORCE_DOWNLOADED_BINARIES="ON"
PS C:\Dev\vcpkg> .\vcpkg.exe fetch cmake
A suitable version of cmake was not found (required v3.30.1).
Extracting cmake...
C:\Dev\vcpkg-downloads\tools\cmake-3.30.1-windows\cmake-3.30.1-windows-i386/bin/cmake.exe
PS C:\Dev\vcpkg> .\vcpkg.exe install vcpkg-from-git-test --overlay-ports scripts/test_ports
Computing installation plan...
The following packages will be built and installed:
vcpkg-from-git-test:x64-windows@0 -- C:\Dev\vcpkg\scripts/test_ports\vcpkg-from-git-test
Detecting compiler hash for triplet x64-windows...
A suitable version of git was not found (required v2.7.4).
Downloading https://github.com/git-for-windows/git/releases/download/v2.51.0.windows.1/PortableGit-2.51.0-64-bit.7z.exe -> PortableGit-2.47.1.2-64-bit.7z.exe
Successfully downloaded PortableGit-2.47.1.2-64-bit.7z.exe
Extracting git...
A suitable version of powershell-core was not found (required v7.5.3).
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.5.3/PowerShell-7.5.3-win-x64.zip -> PowerShell-7.5.3-win-x64.zip
Successfully downloaded PowerShell-7.5.3-win-x64.zip
Extracting powershell-core...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\bion\AppData\Local\vcpkg\archives in 45.4 us. Use --debug to see more details.
Installing 1/1 vcpkg-from-git-test:x64-windows@0...
Building vcpkg-from-git-test:x64-windows@0...
C:\Dev\vcpkg\scripts/test_ports\vcpkg-from-git-test: info: installing overlay port from here
-- Creating test git repository
-- Testing regular mode
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo 3a54c468ea5ece5afa7892669449d145a3351a28...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-3a54c468ea5ece5afa7892669449d145a3351a28.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/45a3351a28-9fd6986d20.clean
-- Testing regular mode that happens to match HEAD
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo f0e7be8bbf960f836158b2059f037b90e6676b31...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0e7be8bbf960f836158b2059f037b90e6676b31.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/90e6676b31-d497a3ff27.clean
-- Testing regular mode with FETCH_REF
-- Using cached C:/Dev/vcpkg-downloads/vcpkg-from-git-test-3a54c468ea5ece5afa7892669449d145a3351a28.tar.gz
-- Cleaning sources at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/45a3351a28-9fd6986d20.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-3a54c468ea5ece5afa7892669449d145a3351a28.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/45a3351a28-9fd6986d20.clean
-- Testing regular mode with FETCH_REF that happens to match HEAD
-- Using cached C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0e7be8bbf960f836158b2059f037b90e6676b31.tar.gz
-- Cleaning sources at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/90e6676b31-d497a3ff27.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-f0e7be8bbf960f836158b2059f037b90e6676b31.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/90e6676b31-d497a3ff27.clean
-- Testing head mode
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo main...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-main.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/main-d497a3ff27.clean
-- Testing head mode + no HEAD_REF -> just uses REF
-- Package does not specify HEAD_REF. Falling back to non-HEAD version.
-- Using cached C:/Dev/vcpkg-downloads/vcpkg-from-git-test-3a54c468ea5ece5afa7892669449d145a3351a28.tar.gz
-- Cleaning sources at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/45a3351a28-9fd6986d20.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-3a54c468ea5ece5afa7892669449d145a3351a28.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/45a3351a28-9fd6986d20.clean
-- Testing new head ref
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo main...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-main.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/main-ffc222d682.clean
-- Testing LFS support
-- Testing fetching with the same Git and LFS urls
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo 277db55ac7096e880d8cdc35951f24a52750e4e9...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-277db55ac7096e880d8cdc35951f24a52750e4e9.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/a52750e4e9-f7c527dec0.clean
-- Testing fetching from different Git and LFS urls
-- Fetching file:///C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/test-git-repo d8b092a7a99bdc5e8771f138ef70b7da6ba4f57a...
-- Extracting source C:/Dev/vcpkg-downloads/vcpkg-from-git-test-d8b092a7a99bdc5e8771f138ef70b7da6ba4f57a.tar.gz
-- Using source at C:/Dev/vcpkg/buildtrees/vcpkg-from-git-test/src/da6ba4f57a-3123213224.clean
-- Skipping post-build validation due to VCPKG_POLICY_EMPTY_PACKAGE
Starting submission of vcpkg-from-git-test:x64-windows@0 to 1 binary cache(s) in the background
Elapsed time to handle vcpkg-from-git-test:x64-windows: 13 s
vcpkg-from-git-test:x64-windows package ABI: e974f50aae7b9a0cf53f4928ec915825eb371d62f56ac21262d759b7026a798d
Total install time: 13 s
Installed contents are licensed to you by owners. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Some packages did not declare an SPDX license. Check the `copyright` file for each package for more information about their licensing.
Waiting for 1 remaining binary cache submissions...
Completed submission of vcpkg-from-git-test:x64-windows@0 to 1 binary cache(s) in 36.3 ms (1/1)
All requested installations completed successfully in: 13 s
PS C:\Dev\vcpkg>Any ideas on what may have changed in that time? |
|
This CMake 3.31 change has already caused observable changes. Lines 2 to 5 in d1ff36c (Recently noticed by unexpected |
|
I was mostly guessing from coincidence, but the failing spot vcpkg/scripts/test_ports/vcpkg-from-git-test/portfile.cmake Lines 284 to 290 in d1ff36c using LFS without args when it is processed like this vcpkg/scripts/cmake/vcpkg_from_git.cmake Lines 1 to 6 in d1ff36c vcpkg/scripts/cmake/vcpkg_from_git.cmake Lines 27 to 29 in d1ff36c could go wrong indeed because arg_LFS is set to an empty value now. |
|
Is there an easy way to run vcpkg with |
|
You can install the test port as an overlay port locally. |
Thats clear ;-) I tried But I don't see anywhere the trace logs ( |
|
I meant |
1e59eaf to
c94e058
Compare
|
@dg0yt You guessed right (I compared the trace with CMake 3.30.9 and 4.2-rc3) Removing vcpkg/scripts/test_ports/vcpkg-from-git-test/portfile.cmake Lines 284 to 290 in d1ff36c vcpkg/scripts/cmake/vcpkg_from_git.cmake Lines 92 to 117 in d1ff36c would not be executed anymore, but I think this is wanted, when I see #28693. So I think the expected behavior is:
So I think both variants from the CMake 4-PR are wrong: #44273 (comment) |
824bb47 to
a71e34c
Compare
|
The So not sure if this was just a temporary CI issue or not. Since it is not the latest version: Is it worth rerunning this PR (which takes another day)? Or should we ignore it and wait with #48335, and then let rebase it to test whether the bug is gone? |
|
This is the typical pattern of a race when both a lib and an executable have the same |
|
Yes, I thought about that too, since we already had this issue when updating Ninja on a port—but there I was able to reproduce it locally. Not so here. So I would have to test it against the CI, and a build takes quite a while. That's why I asked whether we should ignore it and use the port update PR to fix it if the issue is reproducible. |
CI should have cached binary artifacts for most packages now. If you touch quickjs-ng now, it will invalidate this port and its reverse dependencies. So it shouldn't rebuild the world. YMMV. And you could prepare the changes in a separate PR if you want better isolation. |
|
ok, i cherry picked the update from #48335, let's see whether the issue still exists with the latest version of this. |
942b10f to
75a119c
Compare
BillyONeal
left a comment
There was a problem hiding this comment.
Thanks for the update and figuring out the vcpkg_from_git bits!
|
@BillyONeal Seems you forgot that auto-merge doesn't work when were the last pusher ;-) |
Head branch was pushed to by a user without write access
9756382 to
4d18310
Compare
|
Update to CMake 3.31.10 as this contains an regression fix. Not sure whether this could be sometimes relevant for vcpkg:
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Another patch is now necessary. See #48408. |
147ffca to
5c8d0e1
Compare
|
arm64_osx CI issues seems to be related to #48424 |
|
With arm64_osx, realm-core fails due to missing include. |
Unrelated baseline regression, cf. non-PR CI at https://dev.azure.com/vcpkg/public/_build/results?buildId=123128&view=logs&j=ac0731cb-f2f9-5764-2e0a-a6fa8ebb4a08&t=1f8aab00-85d2-59d6-ec59-5750d1aa4b81 |
5f3d9a6 to
c7f5fd9
Compare
|
// Seems so: So realm-core should maybe updated (from v14.10.4 to v14.14.0 or the older v20.1.2) |
|
realm-core: #48482 |
Yes, that works too. I just thought: If the version is old, they may have already fixed it upstream. Last night, I just didn't feel like doing either option anymore ;-). |
c7f5fd9 to
9e33af1
Compare
|
Finally another successful CI run. |
I just checked to see if anyone has already tested CMake 4 here, as some ports are not yet compatible with it, but this has not been particularly relevant so far, as it has been possible to stick with CMake 3. However, with MSVC 2026, CMake 4.2 will become necessary. During my search, I only came across a request from someone who wanted a newer version of CMake 3 (see #48216). Hopefully, no ports will be broken by updating CMake 3, so I'll update it first, as the switch to CMake 4 will probably take longer.
Note: Using x64 binary for windows amd64 now.
Fixes: #43816, #48216
Not sure which version of CMake the CI is currently testing, due to first downloading 3.31.9 and then 3.30.1