Skip to content
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

CMake - Deprecation of versions < 3.5 #92

Open
henrygab opened this issue Sep 19, 2024 · 3 comments
Open

CMake - Deprecation of versions < 3.5 #92

henrygab opened this issue Sep 19, 2024 · 3 comments
Labels
external The cause is external to this project, such as in a library or SDK used.

Comments

@henrygab
Copy link
Collaborator

The following warning appears in the GitHub Action builds.
Should be an easy fix, if someone's up for it.

CMake Deprecation Warning at /home/runner/work/BusPirate5-firmware/BusPirate5-firmware/build/_deps/pico_sdk-src/lib/mbedtls/CMakeLists.txt:23 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
@wyattearp
Copy link
Contributor

@henrygab as a note - this is an issue with the PICO SDK and the way we're using it in the build process. I ran into this and it's corrected if you use the docker compose build system (or at least it is when I just did a run on the current main 5bbaed7).

The fix (or least I think the fix) is to first perform a build of the picotool system and issue the install (see here) it should go away.

Looking at this again, it is specifically using the 2.0.0 version of the build, which is fine, but also, could probably revert the git repo back to head since this is really used to bootstrap picotool to allow the rest of the checks to operate successfully.

@henrygab
Copy link
Collaborator Author

You understand this far better than I do, even with your clear explanations.
I likely don't have the expertise to fix this, so hoping someone else has the background and knowledge to do so.

@henrygab henrygab added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Sep 28, 2024
@henrygab henrygab added external The cause is external to this project, such as in a library or SDK used. and removed bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Oct 11, 2024
@wyattearp
Copy link
Contributor

@henrygab for what it's worth - this is "fixed" in the container build of the BP. By bootstraping the pico-tool build, you only receive the warning when the container is built. Once the pico-tool has been built and installed within the environment, there's no longer this issue or a need for #91

Container build with pico-tool "bootstrap":

wyatt@lazarus ~/git_repos/BusPirate5-firmware (main) $ UID=$(id -u) GID=$(id -g) docker compose build --build-arg UID="$(id -u)" --build-arg GID="$(id -g)" --build-arg USERNAME="build" --progress plain dev 
--progress is a global compose flag, better use `docker compose --progress xx build ...
#0 building with "default" instance using docker driver

#1 [dev internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.23kB done
#1 DONE 0.0s

#2 [dev internal] load metadata for docker.io/library/debian:latest
#2 DONE 0.2s

#3 [dev internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [dev 1/7] FROM docker.io/library/debian:latest@sha256:e11072c1614c08bf88b543fcfe09d75a0426d90896408e926454e88078274fcb
#4 DONE 0.0s

#5 [dev 2/7] RUN rm /bin/sh && ln -s /bin/bash /bin/sh
#5 CACHED

#6 [dev 3/7] RUN apt-get update     && apt-get install --yes --no-install-recommends         bash         wget         curl         python3         python3-pip         cmake         build-essential         git         libnewlib-arm-none-eabi         libnewlib-dev         libstdc++-arm-none-eabi-newlib         sudo         gdb-multiarch         openocd         tio         minicom     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#6 CACHED

#7 [dev internal] load build context
#7 transferring context: 35B done
#7 DONE 0.0s

#8 [dev 4/7] RUN git clone https://github.com/raspberrypi/pico-sdk.git /opt/pico-sdk     && git -C /opt/pico-sdk submodule update --init --recursive     && cd /opt/pico-sdk     && git checkout 2.0.0     && mkdir -p build     && cd build     && cmake ../     && make picotoolBuild     && cmake --install .     && git checkout master
#8 0.212 Cloning into '/opt/pico-sdk'...
#8 1.791 Submodule 'lib/btstack' (https://github.com/bluekitchen/btstack.git) registered for path 'lib/btstack'
#8 1.792 Submodule 'lib/cyw43-driver' (https://github.com/georgerobotics/cyw43-driver.git) registered for path 'lib/cyw43-driver'
#8 1.792 Submodule 'lib/lwip' (https://github.com/lwip-tcpip/lwip.git) registered for path 'lib/lwip'
#8 1.793 Submodule 'lib/mbedtls' (https://github.com/Mbed-TLS/mbedtls.git) registered for path 'lib/mbedtls'
#8 1.793 Submodule 'tinyusb' (https://github.com/hathach/tinyusb.git) registered for path 'lib/tinyusb'
#8 1.796 Cloning into '/opt/pico-sdk/lib/btstack'...
#8 19.66 Cloning into '/opt/pico-sdk/lib/cyw43-driver'...
#8 20.70 Cloning into '/opt/pico-sdk/lib/lwip'...
#8 23.47 Cloning into '/opt/pico-sdk/lib/mbedtls'...
#8 54.87 Cloning into '/opt/pico-sdk/lib/tinyusb'...
#8 63.55 Submodule path 'lib/btstack': checked out '2b49e57bd1fae85ac32ac1f41cdb7c794de335f6'
#8 63.61 Submodule path 'lib/cyw43-driver': checked out 'faf36381bad1f668a30172b6336c9a970966ef4c'
#8 63.71 Submodule path 'lib/lwip': checked out '0a0452b2c39bdd91e252aef045c115f88f6ca773'
#8 63.95 Submodule path 'lib/mbedtls': checked out '5a764e5555c64337ed17444410269ff21cb617b1'
#8 64.32 Submodule path 'lib/tinyusb': checked out '4232642899362fa5e9cf0dc59bad6f1f6d32c563'
#8 65.54 Note: switching to '2.0.0'.
#8 65.54 
#8 65.54 You are in 'detached HEAD' state. You can look around, make experimental
#8 65.54 changes and commit them, and you can discard any commits you make in this
#8 65.54 state without impacting any branches by switching back to a branch.
#8 65.54 
#8 65.54 If you want to create a new branch to retain commits you create, you may
#8 65.54 do so (now or later) by using -c with the switch command. Example:
#8 65.54 
#8 65.54   git switch -c <new-branch-name>
#8 65.54 
#8 65.54 Or undo this operation with:
#8 65.54 
#8 65.54   git switch -
#8 65.54 
#8 65.54 Turn off this advice by setting config variable advice.detachedHead to false
#8 65.54 
#8 65.54 HEAD is now at efe2103 SDK 2.0.0 release
#8 65.57 PICO_SDK_PATH is /opt/pico-sdk
#8 65.57 Defaulting platform (PICO_PLATFORM) to 'rp2040' since not specified.
#8 65.57 Defaulting target board (PICO_BOARD) to 'pico' since not specified.
#8 65.57 Using board configuration from /opt/pico-sdk/src/boards/include/boards/pico.h
#8 65.57 Pico Platform (PICO_PLATFORM) is 'rp2040'.
#8 65.57 -- Defaulting build type to 'Release' since not specified.
#8 65.57 Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m0plus_gcc' since not specified.
#8 65.57 Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m0plus_gcc'
#8 65.58 Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
#8 65.73 -- The C compiler identification is GNU 12.2.1
#8 65.88 -- The CXX compiler identification is GNU 12.2.1
#8 65.90 -- The ASM compiler identification is GNU
#8 65.90 -- Found assembler: /usr/bin/arm-none-eabi-gcc
#8 65.91 -- Detecting C compiler ABI info
#8 65.98 -- Detecting C compiler ABI info - done
#8 65.99 -- Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
#8 65.99 -- Detecting C compile features
#8 66.00 -- Detecting C compile features - done
#8 66.00 -- Detecting CXX compiler ABI info
#8 66.07 -- Detecting CXX compiler ABI info - done
#8 66.09 -- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
#8 66.09 -- Detecting CXX compile features
#8 66.09 -- Detecting CXX compile features - done
#8 66.09 Build type is Release
#8 66.13 CMake Warning at tools/Findpicotool.cmake:28 (message):
#8 66.13   No installed picotool with version 2.0.0 found - building from source
#8 66.13 
#8 66.13   It is recommended to build and install picotool separately, or to set
#8 66.13   PICOTOOL_FETCH_FROM_GIT_PATH to a common directory for all your SDK
#8 66.13   projects
#8 66.13 Call Stack (most recent call first):
#8 66.13   tools/CMakeLists.txt:138 (find_package)
#8 66.13   src/cmake/on_device.cmake:33 (pico_init_picotool)
#8 66.13   src/rp2040/boot_stage2/CMakeLists.txt:57 (pico_add_dis_output)
#8 66.13   src/rp2040/boot_stage2/CMakeLists.txt:101 (pico_define_boot_stage2)
#8 66.13 
#8 66.13 
#8 66.13 Downloading Picotool
#8 67.60 -- Found Python3: /usr/bin/python3 (found version "3.11.2") found components: Interpreter 
#8 67.67 TinyUSB available at /opt/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
#8 67.68 BTstack available at /opt/pico-sdk/lib/btstack
#8 67.69 cyw43-driver available at /opt/pico-sdk/lib/cyw43-driver
#8 67.71 lwIP available at /opt/pico-sdk/lib/lwip
#8 67.72 mbedtls available at /opt/pico-sdk/lib/mbedtls
#8 67.77 -- Configuring done
#8 68.53 -- Generating done
#8 68.56 -- Build files have been written to: /opt/pico-sdk/build
#8 68.66 [  0%] Built target picotoolForceReconfigure
#8 68.69 [  0%] Creating directories for 'picotoolBuild'
#8 68.73 [  0%] No download step for 'picotoolBuild'
#8 68.76 [  0%] No update step for 'picotoolBuild'
#8 68.79 [  0%] No patch step for 'picotoolBuild'
#8 68.83 [  0%] Performing configure step for 'picotoolBuild'
#8 68.84 Not searching for unused variables given on the command line.
#8 68.98 -- The C compiler identification is GNU 12.2.0
#8 69.12 -- The CXX compiler identification is GNU 12.2.0
#8 69.14 -- Detecting C compiler ABI info
#8 69.23 -- Detecting C compiler ABI info - done
#8 69.25 -- Check for working C compiler: /usr/bin/cc - skipped
#8 69.25 -- Detecting C compile features
#8 69.25 -- Detecting C compile features - done
#8 69.26 -- Detecting CXX compiler ABI info
#8 69.35 -- Detecting CXX compiler ABI info - done
#8 69.37 -- Check for working CXX compiler: /usr/bin/c++ - skipped
#8 69.37 -- Detecting CXX compile features
#8 69.37 -- Detecting CXX compile features - done
#8 69.37 .//opt/pico-sdk/build/_deps/picotool/
#8 69.40 -- Using the single-header code from /opt/pico-sdk/build/_deps/picotool-src/lib/nlohmann_json/single_include/
#8 69.93 -- Found Python3: /usr/bin/python3 (found version "3.11.2") found components: Interpreter 
#8 70.05 -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
#8 70.15 -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
#8 70.16 libUSB is not found - no USB support will be built
#8 70.16 -- Configuring done
#8 70.22 -- Generating done
#8 70.22 -- Build files have been written to: /opt/pico-sdk/build/_deps/picotool-build
#8 70.25 [100%] Performing build step for 'picotoolBuild'
#8 83.76 [ 67%] Built target mbedcrypto
#8 85.28 [ 75%] Built target mbedx509
#8 88.99 [ 85%] Built target mbedtls
#8 89.32 [ 87%] Built target errors
#8 90.81 [ 88%] Built target elf
#8 95.13 [ 91%] Built target bintool
#8 96.59 [ 93%] Built target elf2uf2
#8 130.1 [100%] Built target picotool
#8 130.1 [100%] Performing install step for 'picotoolBuild'
#8 130.2 [ 67%] Built target mbedcrypto
#8 130.3 [ 75%] Built target mbedx509
#8 130.3 [ 85%] Built target mbedtls
#8 130.3 [ 87%] Built target errors
#8 130.4 [ 88%] Built target elf
#8 130.4 [ 91%] Built target bintool
#8 130.4 [ 93%] Built target elf2uf2
#8 130.5 [100%] Built target picotool
#8 130.5 Install the project...
#8 130.5 -- Install configuration: "Release"
#8 130.5 [100%] Performing test step for 'picotoolBuild'
#8 130.5 picotool v2.0.0 (Linux, GNU-12.2.0, Release)
#8 130.6 [100%] Completed 'picotoolBuild'
#8 130.6 [100%] Built target picotoolBuild
#8 130.6 -- Install configuration: "Release"
#8 130.7 Switched to branch 'master'
#8 130.7 Your branch is up to date with 'origin/master'.
#8 DONE 130.9s

#9 [dev 5/7] RUN curl -Lo gcc-arm-none-eabi.tar.bz2 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2"     && mkdir /opt/gcc-arm-none-eabi     && tar xf gcc-arm-none-eabi.tar.bz2 --strip-components=1 -C /opt/gcc-arm-none-eabi     && rm -rf gcc-arm-none-eabi.tar.bz2
#9 0.263   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#9 0.263                                  Dload  Upload   Total   Spent    Left  Speed
100   252  100   252    0     0    587      0 --:--:-- --:--:-- --:--:--   588
100  149M  100  149M    0     0  1326k      0  0:01:55  0:01:55 --:--:-- 1295k
#9 DONE 140.2s

#10 [dev 6/7] RUN groupadd --gid "1000" "build"     && useradd --uid "1000" --gid "1000" -m "build" -G dialout -s /usr/bin/bash     && echo "build ALL = (root) NOPASSWD:ALL" > /etc/sudoers.d/"build"     && chmod 0440 /etc/sudoers.d/"build"
#10 DONE 0.3s

#11 [dev 7/7] COPY entrypoint.sh /.
#11 DONE 0.1s

#12 [dev] exporting to image
#12 exporting layers
#12 exporting layers 36.9s done
#12 writing image sha256:e5daa07f5f40652f6eb6ee69afa274f200ab0b0546c5c967a80b665ac265e171 done
#12 naming to docker.io/wyatt3arp/buspirate_v5plus:latest done
#12 DONE 37.0s

#13 [dev] resolving provenance for metadata file
#13 DONE 0.0s

Container build output:

wyatt@lazarus ~/git_repos/BusPirate5-firmware (main) $ docker compose run dev build-clean                                                                                                                    
WARN[0000] The "UID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GID" variable is not set. Defaulting to a blank string. 
WARN[0000] Found orphan containers ([buspirate5-firmware-dev-debug-run-7c9a7e420aff buspirate5-firmware-dev-run-8a4160ad065e buspirate5-firmware-dev-debug-run-461d24df6a94 buspirate5-firmware-dev-debug-run-d3d176174781 buspirate5-firmware-dev-debug-run-a66c1a5d8982 buspirate5-firmware-dev-run-2bcc5305e151 buspirate5-firmware-dev-run-f9ec4d7f7154 buspirate5-firmware-dev-debug-run-6a2a658f9b63 buspirate5-firmware-dev-debug-run-925b43de726b buspirate5-firmware-dev-run-afed9932f451 buspirate5-firmware-dev-run-fe3b51ae019c buspirate5-firmware-dev-run-f24ec44bd877 buspirate5-firmware-dev-run-f61adc36eb1d buspirate5-firmware-dev-run-92e579c78746 buspirate5-firmware-dev-run-4642a5ad29fb buspirate5-firmware-dev-run-1ab0355a82d3 buspirate5-firmware-dev-run-92820cc6162b buspirate5-firmware-dev-run-054d5015aa84 buspirate5-firmware-dev-run-dd39eb1de2e7 buspirate5-firmware-dev-run-5be295e66b13 buspirate5-firmware-dev-run-96cdad40df1d buspirate5-firmware-dev-run-461475de8a7f buspirate5-firmware-dev-run-7d84121cc3b6 buspirate5-firmware-dev-run-548e8ea2966c]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 
mkdir: cannot create directory 'build': File exists
GIT_COMMIT_HASH=""
BP_FIRMWARE_HASH="unknown"
Using PICO_SDK_PATH from environment ('/opt/pico-sdk/')
PICO_SDK_PATH is /opt/pico-sdk
Target board (PICO_BOARD) is 'buspirate5'.
Using board configuration from /project/src/boards/buspirate5.h
Pico Platform (PICO_PLATFORM) is 'rp2040'.
-- Defaulting build type to 'Release' since not specified.
Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m0plus_gcc' since not specified.
Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m0plus_gcc'
Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type is Release
-- Found Python3: /usr/bin/python3 (found version "3.11.2") found components: Interpreter 
TinyUSB available at /opt/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /opt/pico-sdk/lib/btstack
cyw43-driver available at /opt/pico-sdk/lib/cyw43-driver
lwIP available at /opt/pico-sdk/lib/lwip
mbedtls available at /opt/pico-sdk/lib/mbedtls
-- Configuring done
-- Generating done
-- Build files have been written to: /project/build
[  0%] Building ASM object src/pico-sdk/src/rp2040/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[  0%] Linking ASM executable bs2_default.elf
[  0%] Built target bs2_default
[  1%] Generating bs2_default.bin
[  1%] Generating bs2_default_padded_checksummed.S
[  1%] Built target bs2_default_padded_checksummed_asm
[  1%] Built target timestamp
[  1%] Creating directories for 'pioasmBuild'
[  2%] No download step for 'pioasmBuild'
[  3%] No update step for 'pioasmBuild'
[  3%] No patch step for 'pioasmBuild'
[  3%] Performing configure step for 'pioasmBuild'
Not searching for unused variables given on the command line.
loading initial cache file /project/build/src/pico-sdk/src/rp2_common/pico_cyw43_driver/pioasm/tmp/pioasmBuild-cache-Release.cmake
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /project/build/pioasm
[  3%] Performing build step for 'pioasmBuild'
[100%] Built target pioasm
[  3%] Performing install step for 'pioasmBuild'
[100%] Built target pioasm
Install the project...
-- Install configuration: "Release"
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The cause is external to this project, such as in a library or SDK used.
Projects
None yet
Development

No branches or pull requests

2 participants