Skip to content

Multiple CI build failures due to incompatibility between cmake 4.x and mbedtls 2.x (we need to bump to mbedtls 3.x)Β #2391

@diminDDL

Description

@diminDDL

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:

...
[ 11%] Performing configure step for 'picotoolBuild'
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/runner/work/[REDACTED]/build/pioasm
[ 12%] Performing build step for 'pioasmBuild'
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
.//home/runner/work/[REDACTED]/build/_deps/picotool/
-- Using the single-header code from /home/runner/work/[REDACTED]/build/_deps/picotool-src/lib/nlohmann_json/single_include/
CMake Error at /home/runner/pico/pico-sdk/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
make[2]: *** [CMakeFiles/picotoolBuild.dir/build.make:101: picotool/src/picotoolBuild-stamp/picotoolBuild-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:2464: CMakeFiles/picotoolBuild.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target pioasm
[ 13%] Performing install step for 'pioasmBuild'
[100%] Built target pioasm
Install the project...
-- Install configuration: "Release"
[ 14%] Completed 'pioasmBuild'
[ 14%] Built target pioasmBuild
make: *** [Makefile:91: all] Error 2
Error: Process completed with exit code 2.

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions