Skip to content

[vcpkg-tools] Update cmake to 4.2.3#50497

Open
MauriceHubain-Cyncly wants to merge 1 commit intomicrosoft:masterfrom
MauriceHubain-Cyncly:MHC/cmake_4_2_3
Open

[vcpkg-tools] Update cmake to 4.2.3#50497
MauriceHubain-Cyncly wants to merge 1 commit intomicrosoft:masterfrom
MauriceHubain-Cyncly:MHC/cmake_4_2_3

Conversation

@MauriceHubain-Cyncly
Copy link
Copy Markdown

@MauriceHubain-Cyncly MauriceHubain-Cyncly commented Mar 16, 2026

This PR should fix all issues related to Visual Studio 2026 / 18.x, which is not supported by CMake 3.x.

It updates CMake to the latest stable release.

@MauriceHubain-Cyncly
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Cyncly"

@MauriceHubain-Cyncly MauriceHubain-Cyncly marked this pull request as ready for review March 19, 2026 06:46
@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 21, 2026

The failing ports should be modified to fix the problems.

Copy link
Copy Markdown
Member

@vicroms vicroms left a comment

Choose a reason for hiding this comment

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

Please fix or explain why these ports are being baselined.

@vicroms vicroms marked this pull request as draft March 24, 2026 05:56
@MauriceHubain-Cyncly
Copy link
Copy Markdown
Author

I baselined following port-triplet combinations, because they failed in the first CI build for this PR.

faiss:arm64-windows=fail
sdl3-mixer:arm64-windows-static-md=fail
sdl3-mixer:x64-windows-release=fail
sdl3-mixer:x64-windows-static-md=fail
sdl3-mixer:x64-windows-static=fail
sdl3-mixer:x64-windows=fail
sdl3-mixer:x86-windows=fail
suitesparse-cholmod:arm64-windows-static-md=fail
suitesparse-cholmod:arm64-windows=fail
suitesparse-cholmod:x64-windows-static-md=fail
suitesparse-cholmod:x64-windows-static=fail
torch-th:x64-windows-static-md=fail

I can't check the arm64 issues, because I don't have access to such a system.

But I checked all windows triplets on my machine and they work as far as it could be expected.
For each test I cleaned the VCPKG worktree and binary cache:

git clean -dfx
rmdir /s /q "%LOCALAPPDATA%\vcpkg"
call bootstrap-vcpkg.bat -disableMetrics

vcpkg install faiss:x64-windows-release > ../log/faiss-x64-windows-release.log
-> All requested installations completed successfully

vcpkg install faiss:x64-windows-static-md > ../log/faiss-x64-windows-static-md.log
-> All requested installations completed successfully

vcpkg install faiss:x64-windows-static > ../log/faiss-x64-windows-static.log
-> All requested installations completed successfully

vcpkg install faiss:x64-windows > ../log/faiss-x64-windows.log
-> All requested installations completed successfully

vcpkg install faiss:x86-windows > ../log/faiss-x86-windows.log
-> faiss is only supported on '!x86 & !uwp', which does not match x86-windows.
-> expected failure

vcpkg install sdl3-mixer:x64-windows-release > ../log/sdl3-mixer-x64-windows-release.log
-> All requested installations completed successfully

vcpkg install sdl3-mixer:x64-windows-static-md > ../log/sdl3-mixer-x64-windows-static-md.log
-> All requested installations completed successfully

vcpkg install sdl3-mixer:x64-windows-static > ../log/sdl3-mixer-x64-windows-static.log
-> All requested installations completed successfully

vcpkg install sdl3-mixer:x64-windows > ../log/sdl3-mixer-x64-windows.log
-> All requested installations completed successfully

vcpkg install sdl3-mixer:x86-windows > ../log/sdl3-mixer-x86-windows.log
-> All requested installations completed successfully

vcpkg install suitesparse-cholmod:x64-windows-release > ../log/suitesparse-cholmod-x64-windows-release.log
-> All requested installations completed successfully

vcpkg install suitesparse-cholmod:x64-windows-static-md > ../log/suitesparse-cholmod-x64-windows-static-md.log
-> All requested installations completed successfully

vcpkg install suitesparse-cholmod:x64-windows-static > ../log/suitesparse-cholmod-x64-windows-static.log
-> All requested installations completed successfully

vcpkg install suitesparse-cholmod:x64-windows > ../log/suitesparse-cholmod-x64-windows.log
-> All requested installations completed successfully

vcpkg install suitesparse-cholmod:x86-windows > ../log/suitesparse-cholmod-x86-windows.log
-> All requested installations completed successfully

vcpkg install torch-th:x64-windows-release > ../log/torch-th-x64-windows-release.log
-> All requested installations completed successfully

vcpkg install torch-th:x64-windows-static-md > ../log/torch-th-x64-windows-static-md.log
-- Note: torch-th only supports dynamic library linkage. Building dynamic library.
-> expected failure

vcpkg install torch-th:x64-windows-static > ../log/torch-th-x64-windows-static.log
CMake Error at scripts/cmake/vcpkg_check_linkage.cmake:24 (message):
This port can only build as a dynamic library, but the triplet selects a
-> expected failure

vcpkg install torch-th:x64-windows > ../log/torch-th-x64-windows.log
-> All requested installations completed successfully

vcpkg install torch-th:x86-windows > ../log/torch-th-x86-windows.log
-> All requested installations completed successfully

I attach all detailed log files.

faiss-x64-windows-release.log
faiss-x64-windows-static-md.log
faiss-x64-windows-static.log
faiss-x64-windows.log
faiss-x86-windows.log
sdl3-mixer-x64-windows-release.log
sdl3-mixer-x64-windows-static-md.log
sdl3-mixer-x64-windows-static.log
sdl3-mixer-x64-windows.log
sdl3-mixer-x86-windows.log
suitesparse-cholmod-x64-windows-release.log
suitesparse-cholmod-x64-windows-static-md.log
suitesparse-cholmod-x64-windows-static.log
suitesparse-cholmod-x64-windows.log
suitesparse-cholmod-x86-windows.log
torch-th-x64-windows-release.log
torch-th-x64-windows-static-md.log
torch-th-x64-windows-static.log
torch-th-x64-windows.log
torch-th-x86-windows.log

For these test Visual Studio 18.4.1 was used.
I will rerun the same set of tests on another machine with Visual Studio 17.14.29.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 24, 2026

I baselined following port-triplet combinations, because they failed in the first CI build for this PR.

Well, it might still mean it should be fixed as part of this PR.

I can't check the arm64 issues, because I don't have access to such a system.

You can access vcpkg CI logs.

But I checked all windows triplets on my machine and they work as far as it could be expected. ...

You must test the same feature set as in vcpkg CI to (maybe) reproduce the error.

@MauriceHubain-Cyncly
Copy link
Copy Markdown
Author

I baselined following port-triplet combinations, because they failed in the first CI build for this PR.

Well, it might still mean it should be fixed as part of this PR.

I can't check the arm64 issues, because I don't have access to such a system.

You can access vcpkg CI logs.

But I checked all windows triplets on my machine and they work as far as it could be expected. ...

You must test the same feature set as in vcpkg CI to (maybe) reproduce the error.

I'll remove the unexpected entries from the ci.baseline.txt and give it another try.

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 26, 2026

arm64-windows: Both faiss and suitesparse-cholmod report unresolved symbols in lapack.lib which is provided by port clapack. AFAIU the symbols should be provided within port clapack by libf2c.lib.

clapack is quite dated, using a CMakeLists.txt with cmake_minimum_required(VERSION 2.6). Trouble with new versions of CMake can be expected.

suitesparse-cholmod reports in config log:

-- LAPACK libraries:    optimized;D:/installed/arm64-windows/lib/lapack.lib;debug;D:/installed/arm64-windows/debug/lib/lapack.lib;;
-- LAPACK include:      
-- LAPACK linker flags: optimized;D:/installed/arm64-windows/lib/lapack.lib;debug;D:/installed/arm64-windows/debug/lib/lapack.lib;;

I believe there should be also libf2c.lib here...

faiss reports in config log:

-- Found LAPACK: optimized;D:/installed/arm64-windows/lib/lapack.lib;debug;D:/installed/arm64-windows/debug/lib/lapack.lib
-- Using VCPKG FindLAPACK from package 'clapack'

No libf2c either.

libf2c should be injected by port clapack's vendored FindLAPACK.cmake. I see that it relies on the deprecated IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG> properties. But the clapack-targets.cmake generated by the new CMake version has INTERFACE_LINK_LIBRARIES instead. And I could verify that the CMake update changed the exported config. Heads up, this will affect other ports, too - It just doesn't cause trouble until accessing properties directly.

I think it is better to revise port clapack first. I will try to find a few minutes but I cannot really promise much.

@dg0yt dg0yt mentioned this pull request Mar 26, 2026
@MauriceHubain-Cyncly
Copy link
Copy Markdown
Author

arm64-windows: Both faiss and suitesparse-cholmod report unresolved symbols in lapack.lib which is provided by port clapack. AFAIU the symbols should be provided within port clapack by libf2c.lib.

clapack is quite dated, using a CMakeLists.txt with cmake_minimum_required(VERSION 2.6). Trouble with new versions of CMake can be expected.

suitesparse-cholmod reports in config log:

-- LAPACK libraries:    optimized;D:/installed/arm64-windows/lib/lapack.lib;debug;D:/installed/arm64-windows/debug/lib/lapack.lib;;
-- LAPACK include:      
-- LAPACK linker flags: optimized;D:/installed/arm64-windows/lib/lapack.lib;debug;D:/installed/arm64-windows/debug/lib/lapack.lib;;

I believe there should be also libf2c.lib here...

faiss reports in config log:

-- Found LAPACK: optimized;D:/installed/arm64-windows/lib/lapack.lib;debug;D:/installed/arm64-windows/debug/lib/lapack.lib
-- Using VCPKG FindLAPACK from package 'clapack'

No libf2c either.

libf2c should be injected by port clapack's vendored FindLAPACK.cmake. I see that it relies on the deprecated IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG> properties. But the clapack-targets.cmake generated by the new CMake version has INTERFACE_LINK_LIBRARIES instead. And I could verify that the CMake update changed the exported config. Heads up, this will affect other ports, too - It just doesn't cause trouble until accessing properties directly.

I think it is better to revise port clapack first. I will try to find a few minutes but I cannot really promise much.

Thanks for the support! :-)

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Mar 26, 2026

clapack: #50727

@MauriceHubain-Cyncly MauriceHubain-Cyncly force-pushed the MHC/cmake_4_2_3 branch 2 times, most recently from b4a77b6 to 18407a4 Compare March 31, 2026 10:51
@MauriceHubain-Cyncly MauriceHubain-Cyncly marked this pull request as ready for review March 31, 2026 19:33
@MauriceHubain-Cyncly
Copy link
Copy Markdown
Author

@vicroms
Do I need to provide any additional information and changes for this PR?

torch-th:arm64-linux=fail
torch-th:arm64-windows-static-md=fail
torch-th:arm64-windows=fail
torch-th:x64-windows-static-md=fail # torch-th only supports dynamic library linkage
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
torch-th:x64-windows-static-md=fail # torch-th only supports dynamic library linkage

It will build a proper DLL in static-md configuration. Only static (= static CRT) makes it impossible to offer a DLL. But that line already exists.

@vicroms
Copy link
Copy Markdown
Member

vicroms commented Apr 4, 2026

Closed and reopened to trigger CI against latest master.

@alxvth
Copy link
Copy Markdown
Contributor

alxvth commented Apr 7, 2026

ltla-powerit seems to be the only failing port left here. That failure is unrelated to this PR and should be fixed with #51009.

@MauriceHubain-Cyncly MauriceHubain-Cyncly force-pushed the MHC/cmake_4_2_3 branch 2 times, most recently from b8d437a to 18b635b Compare April 8, 2026 14:43
@MauriceHubain-Cyncly MauriceHubain-Cyncly marked this pull request as draft April 9, 2026 07:14
@MauriceHubain-Cyncly MauriceHubain-Cyncly marked this pull request as ready for review April 9, 2026 07:14
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.

4 participants