-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Multiple CI build failures due to incompatibility between cmake 4.x and mbedtls 2.x (we need to bump to mbedtls 3.x) #2391
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
Comments
How bizarre that upgrading to a newer version of CMake causes the entire build to fail 😖
Are you able to force your CI to use an older version of CMake in the meantime? |
Hello, thank you for the quick response. My CI/CD can use an older version of cmake just fine, I just wanted to notify the team about this issue that people would likely encounter more and more over time now that Ubuntu seems to ship this new version of cmake. |
I'm not entirely sure why we haven't updated mbedtls to mbedtls-3.x. It would probably be a good idea to keep in sync with Micropython. |
At least the CMake version that causes this (4.0), was only released last week. Another point to add is that because the error happens in the picotool build, the suggested workaround of (Interestingly this is causing my actions to fail randomly, a retry usually fixes it) |
GitHub runners don't all update at once, so some are on CMake version 3.x and some on version 4 - actions failing just depends on which one you happen to get |
Just wanted to tack on to this that the project I work with, GP2040-CE, which relies very heavily on the SDK, is now unable to build at all due to this Cmake issue, and it's not just MBed, but TinyUSB as well. |
Here's our error for GP2040-CE
|
Looking at that output, you're still building with SDK 1.5.1 (the |
Welp. I just found my way onto this band-wagon too. Currently between a rock and a hard place because GitHub is dropping support for the |
Yeah - I think we should update asap. |
I was curious and did a little digging... https://packages.ubuntu.com/noble/cmake says that Ubuntu 24.04 is shipping "cmake (3.28.3-1build7)", and apparently it's been doing that since 15th April 2024, so this is definitely seems to be more of a GitHub-runner thing than an Ubuntu-version thing. https://github.com/actions/runner-images/blame/main/images/ubuntu/Ubuntu2004-Readme.md and https://github.com/actions/runner-images/blame/main/images/ubuntu/Ubuntu2204-Readme.md and https://github.com/actions/runner-images/blame/main/images/ubuntu/Ubuntu2404-Readme.md all say that they've been using "CMake 3.31.6" since 5th March 2025 or 6th March 2025. Ah, https://github.com/kitware/cmake/releases says that CMake v4.0.0 was released on 27th March 2025, so perhaps that's the culprit? OHHH!!! https://github.com/raspberrypi/pico-sdk-tools/actions/runs/14205668044/job/39834883585 also failed with the same error, and that's using https://github.com/actions/runner-images/blob/ubuntu22/20250330.1/images/ubuntu/Ubuntu2204-Readme.md which switched to "CMake 4.0.0" on 31st March 2025. Culprit found 😆 But how confusing that https://github.com/actions/runner-images/tree/ubuntu22/20250330.1 is actually ahead of https://github.com/actions/runner-images/tree/main |
Well, at least installing the version before works: Daft-Freak/CnC_and_Red_Alert@81a23f5 Though that version does warn about support for versions < 3.10 being removed in the future, so might want to be careful about this not happening again in a few releases... |
We should upgrade Mbed TLs to v3.6 or newer version.
|
Just adding this for clarity |
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
GitHub appear to have erroneously introduced CMake 4.0 - including a compatibility break with CMake < 3.5 causing the picotool build to fail with an error in mbedtls: pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Install a custom CMake version until this is resolved. Or, y'know, might as well do this forever because we can't trust upstream :/ See: raspberrypi/pico-sdk#2391 And: actions/runner-images#11926
Is there a timeline for how fast this will get updated? Homebrew on macos has also upgraded to cmake 4.0 and doesn't seem to have a 3.x version anymore in it. |
No |
I read the whole thread, but didn’t find any workaround besides downgrading to CMake 3. Are there any other options? Sorry if I missed something. |
You can use your own version of mbedtls by passing PICO_MBEDTLS_PATH to cmake |
merged into develop |
Fixed by #2405 |
I have a CI/CD pipeline set up for one of my projects that pulls the latest version of Ubuntu and installs all required build tools through apt, and then pulls in pico-sdk and uses it to build stuff.
Today I saw the pipeline fail with the following error:
This happened because the CI/CD setup installed cmake 3.28.3-1build7.
As far as I understand doing something like
cmake_minimum_required(VERSION 3.5...3.27)
(which is used elsewhere in the sdk) in the relevant files should fix this.I am unsure if this should be reported here or somewhere else, if so I would be grateful if someone pointed me towards the right place to report this.
Thank you.
The text was updated successfully, but these errors were encountered: