Skip to content

Update to CMake 3.31.10#48250

Merged
BillyONeal merged 2 commits into
microsoft:masterfrom
SunBlack:update_cmake
Dec 5, 2025
Merged

Update to CMake 3.31.10#48250
BillyONeal merged 2 commits into
microsoft:masterfrom
SunBlack:update_cmake

Conversation

@SunBlack
Copy link
Copy Markdown
Contributor

@SunBlack SunBlack commented Nov 12, 2025

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

A suitable version of cmake was not found (required v3.31.9).
Trying to download cmake-3.31.9-windows-x86_64.zip using asset cache https://vcpkgassetcachewus.blob.core.windows.net/cache/b82a496fb94376dae5d7f6824631f59d75891628a9c25f0e5a798dc350a05fd73d2b572bb44009e5a73222f4f98faf927d938acda3d3ec82ea1c175fd462f664?*** SECRET ***
Download successful! Asset cache hit, did not try authoritative source https://github.com/Kitware/CMake/releases/download/v3.31.9/cmake-3.31.9-windows-x86_64.zip
Extracting cmake...
Computing 0 install plans...
Computing all ABI hashes...
Checking the binary cache...
All feature tests passed.
Clearing contents of D:\b
Clearing contents of D:\installed
Skipping clearing contents of D:\p because it was not a directory.
Comparing with HEAD~1
CI baseline unchanged, determining parent hashes
warning: vcpkg ci is an internal command which will change incompatibly or be removed at any time.
Loading dependency information for 1141 packages...
A suitable version of cmake was not found (required v3.30.1).
Trying to download cmake-3.30.1-windows-i386.zip using asset cache https://vcpkgassetcachewus.blob.core.windows.net/cache/0b74bd4222064cfb6e42838987704eb21d57ad5f7bbd87714ab570f1d107fa19bd2f14316475338518292bc377bf38b581a07c73267a775cd385bbd1800879b4?*** SECRET ***
Download successful! Asset cache hit, did not try authoritative source https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-windows-i386.zip
Extracting cmake...
Detecting compiler hash for triplet x64-windows...

@Neumann-A
Copy link
Copy Markdown
Contributor

#44273 for cmake 4 probably needs to be updated and rerun

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 12, 2025

FTR vcpkg is used with CMake 4. The key enabler was

if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0")
set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)
endif()

@SunBlack
Copy link
Copy Markdown
Contributor Author

FTR vcpkg is used with CMake 4.

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.

@BillyONeal
Copy link
Copy Markdown
Member

The vcpkg-from-git-test failure repros for me locally:

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?

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 14, 2025

This CMake 3.31 change has already caused observable changes.
https://cmake.org/cmake/help/latest/policy/CMP0174.html
And it is activated by

if(POLICY CMP0174)
# Use CMake 3.31 behavior for cmake_parse_arguments(PARSE_ARGV)
cmake_policy(SET CMP0174 NEW)
endif()

(Recently noticed by unexpected /// in sourceforge URLS due to if() taking an unexpected path, #48211)

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 14, 2025

I was mostly guessing from coincidence, but the failing spot

vcpkg_from_git(
OUT_SOURCE_PATH source_path
URL "${git_remote}"
REF "${ref}"
HEAD_REF main
LFS
)

using LFS without args when it is processed like this
function(vcpkg_from_git)
cmake_parse_arguments(PARSE_ARGV 0 "arg"
""
"OUT_SOURCE_PATH;URL;REF;FETCH_REF;HEAD_REF;TAG;LFS"
"PATCHES"
)

if(NOT DEFINED arg_LFS AND "LFS" IN_LIST arg_KEYWORDS_MISSING_VALUES)
set(arg_LFS "${arg_URL}")
endif()

could go wrong indeed because arg_LFS is set to an empty value now.

@SunBlack
Copy link
Copy Markdown
Contributor Author

Is there an easy way to run vcpkg with --trace-expand and see the output? So we could compare the old trace with the new one.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 14, 2025

You can install the test port as an overlay port locally.

@SunBlack
Copy link
Copy Markdown
Contributor Author

You can install the test port as an overlay port locally.

Thats clear ;-)

I tried

set VCPKG_CMAKE_FLAGS=--trace-expand
vcpkg.exe install vcpkg-from-git-test --overlay-ports scripts/test_ports  

But I don't see anywhere the trace logs (vcpkg\buildtrees\vcpkg-from-git-test\git-archive-err.log has still only a few lines and all other files in this dir are also not much bigger)

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 14, 2025

I meant

vcpkg.exe install vcpkg-from-git-test --overlay-ports scripts/test_ports --cmake-args=--trace-expand

@SunBlack
Copy link
Copy Markdown
Contributor Author

@dg0yt You guessed right (I compared the trace with CMake 3.30.9 and 4.2-rc3)

Removing LFS from here:

vcpkg_from_git(
OUT_SOURCE_PATH source_path
URL "${git_remote}"
REF "${ref}"
HEAD_REF main
LFS
)

if(arg_LFS)
# Running "git lfs" searches for "git-lfs[.exe]" on the path
vcpkg_execute_in_download_mode(
COMMAND "${GIT}" lfs --version
OUTPUT_VARIABLE lfs_version_output
ERROR_VARIABLE lfs_version_error
RESULT_VARIABLE lfs_version_result
WORKING_DIRECTORY "${git_working_directory}"
)
if(lfs_version_result)
message(FATAL_ERROR "Git LFS is required for ${PORT}")
endif()
vcpkg_execute_required_process(
ALLOW_IN_DOWNLOAD_MODE
COMMAND "${GIT}" lfs install --local --force
WORKING_DIRECTORY "${git_working_directory}"
LOGNAME "git-lfs-install-${TARGET_TRIPLET}"
)
vcpkg_execute_required_process(
ALLOW_IN_DOWNLOAD_MODE
COMMAND "${GIT}" lfs fetch "${arg_LFS}" "${ref_to_fetch}"
WORKING_DIRECTORY "${git_working_directory}"
LOGNAME "git-lfs-fetch-${TARGET_TRIPLET}"
)
endif()

would not be executed anymore, but I think this is wanted, when I see #28693. So I think the expected behavior is:

  • LFS not passed => arg_LFS will be still not defined
  • LFS passed without value => arg_URL will be used
  • LFS passed with value => keep value

So I think both variants from the CMake 4-PR are wrong: #44273 (comment)

@SunBlack SunBlack force-pushed the update_cmake branch 2 times, most recently from 824bb47 to a71e34c Compare November 15, 2025 11:47
@SunBlack
Copy link
Copy Markdown
Contributor Author

The x64_windows_static build failed due to the quickjs-ng port. Running locally vcpkg install quickjs-ng:x64-windows-static works. The error on the CI:

[18/23] C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.31.9-windows\cmake-3.31.9-windows-x86_64\bin\cmake.exe -E vs_link_exe --msvc-ver=1944 --intdir=CMakeFiles\qjs_exe.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe  CMakeFiles\qjs_exe.dir\gen\repl.c.obj CMakeFiles\qjs_exe.dir\gen\standalone.c.obj CMakeFiles\qjs_exe.dir\qjs.c.obj CMakeFiles\qjs_exe.dir\quickjs-libc.c.obj  /out:qjs.exe /implib:qjs.lib /pdb:qjs.pdb /version:0.0 /machine:x64 /STACK:8388608 /nologo    /debug /INCREMENTAL /subsystem:console  qjs.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: [code=4294967295] qjs.exe 
C:\Windows\system32\cmd.exe /C "cd . && D:\downloads\tools\cmake-3.31.9-windows\cmake-3.31.9-windows-x86_64\bin\cmake.exe -E vs_link_exe --msvc-ver=1944 --intdir=CMakeFiles\qjs_exe.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe  CMakeFiles\qjs_exe.dir\gen\repl.c.obj CMakeFiles\qjs_exe.dir\gen\standalone.c.obj CMakeFiles\qjs_exe.dir\qjs.c.obj CMakeFiles\qjs_exe.dir\quickjs-libc.c.obj  /out:qjs.exe /implib:qjs.lib /pdb:qjs.pdb /version:0.0 /machine:x64 /STACK:8388608 /nologo    /debug /INCREMENTAL /subsystem:console  qjs.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FINAL LINK: command "C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\link.exe CMakeFiles\qjs_exe.dir\gen\repl.c.obj CMakeFiles\qjs_exe.dir\gen\standalone.c.obj CMakeFiles\qjs_exe.dir\qjs.c.obj CMakeFiles\qjs_exe.dir\quickjs-libc.c.obj /out:qjs.exe /implib:qjs.lib /pdb:qjs.pdb /version:0.0 /machine:x64 /STACK:8388608 /nologo /debug /INCREMENTAL /subsystem:console qjs.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\qjs_exe.dir/intermediate.manifest CMakeFiles\qjs_exe.dir/manifest.res" failed (exit code 1201) with the following output:
LINK : fatal error LNK1201: error writing to program database 'D:\b\quickjs-ng\x64-windows-static-dbg\qjs.pdb'; check for insufficient disk space, invalid path, or insufficient privilege

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?

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 17, 2025

This is the typical pattern of a race when both a lib and an executable have the same OUTPUT_NAME, leading the same PDB_NAME. I usually patch such packages to set the executables PDB_NAME property to <output_name>.exe.
git grep PDB_NAME for examples.

@SunBlack
Copy link
Copy Markdown
Contributor Author

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.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 17, 2025

So I would have to test it against the CI, and a build takes quite a while.

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.

@SunBlack
Copy link
Copy Markdown
Contributor Author

ok, i cherry picked the update from #48335, let's see whether the issue still exists with the latest version of this.

BillyONeal
BillyONeal previously approved these changes Nov 17, 2025
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update and figuring out the vcpkg_from_git bits!

@BillyONeal BillyONeal enabled auto-merge (squash) November 17, 2025 20:19
@SunBlack
Copy link
Copy Markdown
Contributor Author

@BillyONeal Seems you forgot that auto-merge doesn't work when were the last pusher ;-)

@SunBlack SunBlack changed the title Update to CMake 3.31.9 Update to CMake 3.31.10 Nov 19, 2025
auto-merge was automatically disabled November 19, 2025 14:29

Head branch was pushed to by a user without write access

@SunBlack
Copy link
Copy Markdown
Contributor Author

Update to CMake 3.31.10 as this contains an regression fix. Not sure whether this could be sometimes relevant for vcpkg:

The execute_process() command once again terminates child processes when its TIMEOUT is reached. This was accidentally regressed by CMake 3.29.

@BillyONeal
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@SunBlack
Copy link
Copy Markdown
Contributor Author

Another patch is now necessary. See #48408.

@SunBlack SunBlack force-pushed the update_cmake branch 2 times, most recently from 147ffca to 5c8d0e1 Compare November 21, 2025 00:28
@SunBlack
Copy link
Copy Markdown
Contributor Author

arm64_osx CI issues seems to be related to #48424

Comment thread scripts/vcpkg-tools.json Outdated
@bansan85
Copy link
Copy Markdown
Contributor

With arm64_osx, realm-core fails due to missing include.

/Users/vcpkg/Data/b/realm-core/src/v14.10.4-4f0ae21d2e.clean/src/realm/util/cli_args.cpp:71:19: error: no member named 'strtol' in namespace 'std'; did you mean simply 'strtol'?

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 24, 2025

With arm64_osx, realm-core fails due to missing include.

/Users/vcpkg/Data/b/realm-core/src/v14.10.4-4f0ae21d2e.clean/src/realm/util/cli_args.cpp:71:19: error: no member named 'strtol' in namespace 'std'; did you mean simply 'strtol'?

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

@SunBlack SunBlack force-pushed the update_cmake branch 2 times, most recently from 5f3d9a6 to c7f5fd9 Compare November 25, 2025 12:07
@SunBlack
Copy link
Copy Markdown
Contributor Author

SunBlack commented Nov 25, 2025

realm-core still fails. This was mentioned already here, so still not relevant to this PR? #48303 (comment)

// Seems so:

/Users/vcpkg/Data/b/realm-core/src/v14.10.4-4f0ae21d2e.clean/src/realm/util/cli_args.cpp:71:19: error: no member named 'strtol' in namespace 'std'; did you mean simply 'strtol'?
   71 |     int64_t val = std::strtol(m_value.data(), nullptr, 10);
      |                   ^~~~~~~~~~~
      |                   strtol
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdlib.h:191:7: note: 'strtol' declared here
  191 | long     strtol(const char *__str, char *_LIBC_CSTR *__endptr, int __base);
      |          ^
1 error generated.

So realm-core should maybe updated (from v14.10.4 to v14.14.0 or the older v20.1.2)

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Nov 26, 2025

realm-core: #48482
(Patch needed despite update.)

@SunBlack
Copy link
Copy Markdown
Contributor Author

realm-core: #48482 (Patch needed despite update.)

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 ;-).

@SunBlack
Copy link
Copy Markdown
Contributor Author

Finally another successful CI run.

Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BillyONeal BillyONeal merged commit c93294d into microsoft:master Dec 5, 2025
18 checks passed
@SunBlack SunBlack deleted the update_cmake branch December 5, 2025 08:37
geiseri pushed a commit to geiseri/vcpkg that referenced this pull request Dec 18, 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.

[qtgraphs] Build failure on x64-windows due to CMake Version

5 participants