-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update mimimum required cmake version #3802
Update mimimum required cmake version #3802
Conversation
@paul-elliott-arm this might also have your interest |
https://travis-ci.org/github/ARMmbed/mbedtls/builds/737330091 is failing since the verifier is running 3.12 |
This is going to require some discussion with the team - historically we have to support a wide range of older cmake versions, but as you point out, it looks as if this is coming to a head. Thankyou for bringing this to our attention, and I will definitely get back to you. |
@paul-elliott-arm whether the upgrade ends on 3.15 or something else e.g. 3.12 (as you use) seems to be fine from my side, but seems that 2.x is getting retired "within soon". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake 3.15 is far too recent for us to require it.
CMakeLists.txt
Outdated
@@ -16,7 +16,7 @@ | |||
# will be removed as well as this note. | |||
# | |||
|
|||
cmake_minimum_required(VERSION 2.6) | |||
cmake_minimum_required(VERSION 3.15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks compatibility with RHEL/CentOS 7, which carries CMake 2.8.12.2. For basic functionality (configuring and building the library and the unit tests), we try to stick to tooling that is available in popular long-term support distributions.
Updating to cmake_minimum_required(VERSION 2.8.12.2)
would be ok as far as I know, although I think we should make this change only in development, not in our long-time support branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gilles-peskine-arm I suggest to contact the cmake developers https://gitlab.kitware.com/cmake/cmake about what makes most sense. But given that the cmake developers are good at providing new packages it might be good to go to 3.x soon.
And https://blog.kitware.com/cmake-2-8-12-2-available-for-download/ shows that it is 6,5 years old - and I guess within 6-12 months quite a few developers will use cmake 3.19 or later.
I fully understand the problem, and I just suggest that you make a good plan :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #3801, I can see:
CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
Thus minimum version of 2.8.12 seems to be a good fit for RHEL/CentOS 7 and cmake 3.19, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to constraint development tools too much. Support for CentOS as a development environment is a common request. How often CMake makes releases is irrelevant: what's relevant is how often CentOS and other distributions make releases. CMake is keeping support for 2.8.12 for the same reason we want to keep support for 2.8.12.
2.8.12 was included in some Linux distros' LTS branches and so is much more common than older 2.8 versions. That made it feel like a natural cutoff point, and I want to be conservative since this is the first time we're heading toward removing support for any policy's OLD behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As regards LTS branches, the versions prior to 2.18.2 are not removed yet (I am presuming this error is not fatal yet), just deprecated, so it kinda depends on how long we see the LTS branches living for. At some point we would have to backport this as otherwise the LTS branches may stop working with newer CMake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanx for the feedback @paul-elliott-arm @ronald-cron-arm and @gilles-peskine-arm - I have revised the PR to require 2.8.12 which I tested to be ok with cmake 3.19.0-rc1.
Just note that the mimimum cmake is not just a check of the used cmake version, it is also a load of rules - which have changed over time. Thus testing is golden....
Better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the choice of the minimum required version. Otherwise, please squash the two commits and add a commit message explaining the rationale of the change. Add also a "Changes" change log explaining the change and its rationale.
Otherwise, you are missing the required "Signed-off-by: Peter Toft peter.toft@dirac.com" in commit message.
b2a2929
to
2075a81
Compare
@ronald-cron-arm I have updated the PR with 2075a81 |
Please indicate your acceptance of the developer certificate of origin with a signoff line in the commit message ( |
2075a81
to
15c158b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to bother you again with details but that's for the sake of project history.
. Commit message: Please explain why 2.8.12: minimum version for cmake 3.19 compatibilty and also compatible with MbedTLS support of RHEL/CentOS 7 LTS I think.
. Typo in the commit message title: "mimumum"
. Add a "Changes" change log entry: see ChangeLog.d/00README.md and *.txt examples in ChangeLog.d.
15c158b
to
177165b
Compare
@paul-elliott-arm @ronald-cron-arm Have a look again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. There are 2 typos in the commit message that you may want to fix: "Update minumum" and "This PR updates the mimumum" but I am approving the PR anyway.
177165b
to
451a633
Compare
@ronald-cron-arm lets get it right - check one more time (the commit message). |
@ronald-cron-arm did I goof up? I see -> peter-toft-greve dismissed ronald-cron-arm’s stale review via 451a633 28 minutes ago. |
No worries, you pushed a new version thus GitHub automatically dismissed my approval as there is something new that needs me having another look. |
* As described in issue Mbed-TLS#3801 the upcoming cmake 3.19 will not support cmake 2.6 any more * This PR updates the mimimum required cmake version to 2.8.12, which will not give a warning with cmake 3.19 but still compatible with MbedTLS support of RHEL/CentOS 7 LTS * Adding ChangeLog.d/bugfix_PR3802.txt Signed-off-by: Peter Toft <peter.toft@dirac.com>
451a633
to
70e2062
Compare
I take it that friendly folks will take it from here :) |
The failure of the pr-head job is a known intermittent DTLS failure which is unrelated to this PR. |
@gilles-peskine-arm Is it possible to consider this fix for mbedtls-2.16 branch? |
Upcoming cmake 3.19 will not support cmake 2.6 any more, hence the fix. Please see Mbed-TLS#3802 for more details.
Upcoming cmake 3.19 will not support cmake 2.6 any more, hence the fix. Please see Mbed-TLS#3802 for more details.
Upcoming cmake 3.19 will not support cmake 2.6 any more, hence the fix. Please see Mbed-TLS#3802 for more details.
Upgrade minimum cmake version to 3.15
Signed-off-by: Peter Toft peter.toft@dirac.com