-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Proposal: Update minimum CMake version required to build the dotnet/runtime repo to 3.20 #74027
Comments
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsNow that we're starting a new release, it's worth revisiting our build requirements across our different supported platforms. For many if not all of our releases, we have had different minimum CMake version requirements depending on the platform. This has generally been due to a variety of different circumstances, varying from version availability on platform to fixes in CMake that are required for use with new supported target platforms or newer versions of Visual Studio. A few years back, we tried to move our minimum CMake version up to 3.14. This provided us many benefits and allowed us to simplify our build significantly. However, this broke our source-build partners at RedHat. As a result, we ended up rolling back our minimum version of CMake on Linux to 3.6.2 to satisfy the source-build requirements. In the meantime, our minimum required version of CMake has risen on our non-Linux platforms (and on Linux for non-source-build scenarios) due to various issues. Due to some bugs in the CMake integration on Windows, we had to update our minimum suggested version to 3.16.4. For people that wish to use the MSBuild backend (which is not the default), 3.21 is required. Due to bugs in the CMake support for iOS, the minimum required version for our Mac builds is 3.15.5 on the product, and 3.16 on the tests. For MacCatalyst support, the minimum required version is 3.18. On our non-source-build Linux builds where we use the in-tree copy of In #69611 (comment), we determined that RedHat only requires 3.18.2 for their new builds of .NET, not 3.6.2, as they have updated their optional build toolsets that are used by llvm and clang to more modern versions. RedHat is not our only partner in this space. Our new partners at Canonical are also using source-build for Ubuntu and have a similar class of requirements. However, there are currently no plans to support versions of Ubuntu below 22.04, so the minimum version we would have to use to support our partners at Canonical would be 3.22.1. Looking at some of our other platforms (some community supported), they all provide versions of CMake of at least 3.18 or newer.
Given all of this information, it seems that we can finally set a minimum version of CMake across all of our platforms at 3.18. This will enable us to have a simpler repository prerequisite matrix, and it will simplify our support matrix in our CMake scripts. Instead of some branches being able to use newer features because they're only used when we are using newer CMake versions, we will have a consistent feature set used across the repository. cc: @dotnet/runtime-infrastructure for the Microsoft build.
|
/cc @shushanhf for LA64 port of CMake. |
Yes, you are right. I will feedback to our OS to update the LA's cmake version. Thanks |
cc @dotnet/source-build-internal |
Since .NET 8 will only support RHEL 8 (and Alpine Linux 3.15 and older will be out of support), we can update the minimum to 3.20.2. RHEL8 ships with 3.20.2, Alpine Linux 3.23.1, and everything else we source-build for ships with newer versions (and it sounds like LA will use 3.20.6). This moves us out of range for the currently released Debian versions based on the previously-linked table, but there are no current plans for .NET to be source-built into a currently-released Debian version to my knowledge and Debian Sid has a CMake version newer than 3.20.2. |
CMake 3.20 provides native support for |
cc @dotnet/distro-maintainers - FYI, please speak up if this is a concern for your distro. |
Once #84148 is in. We can start on this work. Marking as blocked until then. |
This work is now unblocked. I've updated the original post to have the correct target version. |
Now that we're starting a new release, it's worth revisiting our build requirements across our different supported platforms. For many if not all of our releases, we have had different minimum CMake version requirements depending on the platform. This has generally been due to a variety of different circumstances, varying from version availability on platform to fixes in CMake that are required for use with new supported target platforms or newer versions of Visual Studio.
A few years back, we tried to move our minimum CMake version up to 3.14. This provided us many benefits and allowed us to simplify our build significantly. However, this broke our source-build partners at RedHat. As a result, we ended up rolling back our minimum version of CMake on Linux to 3.6.2 to satisfy the source-build requirements.
In the meantime, our minimum required version of CMake has risen on our non-Linux platforms (and on Linux for non-source-build scenarios) due to various issues.
Due to some bugs in the CMake integration on Windows, we had to update our minimum suggested version to 3.16.4. For people that wish to use the MSBuild backend (which is not the default), 3.21 is required.
Due to bugs in the CMake support for iOS, the minimum required version for our Mac builds is 3.15.5 on the product, and 3.16 on the tests. For MacCatalyst support, the minimum required version is 3.18.
On our non-source-build Linux builds where we use the in-tree copy of
libunwind
, our minimum requirement is 3.16 as libunwind requires that version.In #69611 (comment), we determined that RedHat only requires 3.18.2 for their new builds of .NET, not 3.6.2, as they have updated their optional build toolsets that are used by llvm and clang to more modern versions..NET 8 and newer will only support RHEL 8 and newer, which has CMake 3.20.2.
RedHat is not our only partner in this space. Our new partners at Canonical are also using source-build for Ubuntu and have a similar class of requirements. However, there are currently no plans to support versions of Ubuntu below 22.04, so the minimum version we would have to use to support our partners at Canonical would be 3.22.1.
Looking at some of our other platforms (some community supported), they all provide versions of CMake of at least 3.20 or newer.
Given all of this information, it seems that we can finally set a minimum version of CMake across all of our platforms at 3.20. This will enable us to have a simpler repository prerequisite matrix, and it will simplify our support matrix in our CMake scripts. Instead of some branches being able to use newer features because they're only used when we are using newer CMake versions, we will have a consistent feature set used across the repository.
cc: @dotnet/runtime-infrastructure for the Microsoft build.
cc: @dotnet/distro-maintainers for the distro source builds.
cc: @omajid @mirespace specifically for feedback from RedHat and Canonical respectively
The text was updated successfully, but these errors were encountered: