Skip to content

Error during configuration phase of SDK 2.0.0 - cmake version error #39

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

Closed
dshadoff opened this issue Aug 12, 2024 · 4 comments
Closed

Comments

@dshadoff
Copy link

See issue #38 for an earlier issue during my install which does not appear to be related - this issue happens after restarting and getting past that error.

The tool appears to be reporting that I need CMake 3.17 (see bottom for more detailed output).
However, the pico-sdk README.md states a minimum level of CMake 3.13 is required (and there is no README.md for pico-setup to indicate any minimum requirements) - so at the very least, the documentation of each of the pieces should be updated to reflect actual requirements.

Under the assumption that I just needed to upgrad to 3.17, I tried to upgrade... however, I am not able to obtain a version more recent than CMake 3.16.3 (which I have installed):

$ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

$ sudo apt-get upgrade cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.16.3-3~bpo10+1).
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
gsfonts-x11 liblzo2-2 libmotif-common libtrio2 libvorbisidec1 libxm4 python-colorzero vlc-l10n vlc-plugin-notify
vlc-plugin-samba vlc-plugin-video-splitter vlc-plugin-visualization xfonts-encodings xfonts-utils
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
code libvlc-bin libvlc5 python-sense-emu-doc vlc vlc-bin vlc-data vlc-plugin-base vlc-plugin-qt vlc-plugin-skins2
vlc-plugin-video-output
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

For context, I am using a Raspberry Pi 400, and 'uname -a' outputs the following:

$ uname -a
Linux raspberrypi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Here is the output from the install script which indicates the CMake dependency:

-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
Build type is Debug
Using regular optimized debug build (set PICO_DEOPTIMIZED_DEBUG=1 to de-optimize)
CMake Error at /home/pi/devel/pico/pico-setup/pico/pico-sdk/tools/Findpicotool.cmake:7 (cmake_minimum_required):
  CMake 3.17 or higher is required.  You are running version 3.16.3
Call Stack (most recent call first):
  /home/pi/devel/pico/pico-setup/pico/pico-sdk/tools/CMakeLists.txt:138 (find_package)
  /home/pi/devel/pico/pico-setup/pico/pico-sdk/src/cmake/on_device.cmake:33 (pico_init_picotool)
  /home/pi/devel/pico/pico-setup/pico/pico-sdk/src/rp2040/boot_stage2/CMakeLists.txt:57 (pico_add_dis_output)
  /home/pi/devel/pico/pico-setup/pico/pico-sdk/src/rp2040/boot_stage2/CMakeLists.txt:101 (pico_define_boot_stage2)


-- Configuring incomplete, errors occurred!
See also "/home/pi/devel/pico/pico-setup/pico/pico-examples/build_pico/CMakeFiles/CMakeOutput.log".
See also "/home/pi/devel/pico/pico-setup/pico/pico-examples/build_pico/CMakeFiles/CMakeError.log".
@will-v-pi
Copy link
Contributor

Fixed by #43 - CMake 3.17 is only required when you haven't built & installed picotool separately

@lurch
Copy link
Contributor

lurch commented Jun 5, 2025

Not that it really matters now, but FYI Raspberry Pi OS Bookworm currently includes cmake version 3.25.1.

@dshadoff
Copy link
Author

dshadoff commented Jun 5, 2025

My approach had been - on an existing system - to use pico-setup to install the full tree each time a new SDK was released; first, moving the existing tree out of the way to a different named folder. In this way, the system looked "fresh" each install. But as it was being done on an existing machine, it was using the OS and tools installed at the time of setup (which was 2021).
All of that as an explanation for why Cmake 3.16 was the version on the machine.

If the SDK requires a minimum version number on its tools (cmake, operating system, or other), this should be documented for users (documentation stated cmake 3.13 was minimum needed).

@lurch
Copy link
Contributor

lurch commented Jun 5, 2025

first, moving the existing tree out of the way to a different named folder. In this way, the system looked "fresh" each install.

I guess that approach doesn't produce an entirely fresh system, as https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh#L65 and https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh#L99 and https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh#L144 are modifying files outside of the pico directory created by pico_setup.sh.

it was using the OS and tools installed at the time of setup (which was 2021).

FYI we expect to be releasing Raspberry Pi OS Trixie later this year, at which point anything older than Raspberry Pi OS Bookworm will be unsupported.

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

No branches or pull requests

3 participants