updating the SDK to 2.8.0 resulting in non working cmake compilation.

I have a sample app (hellow world from the zephyr samples).

It compiled well on my system in vscode using 2.7.0 and sysbuild.

I then installed 2.8.0 and suddenly the build fails, the cmake cannot find the python libraries.

The reason seemed to be that even though i have defined the default SDK and toolchain to be 2.7.0 when calling ncsconfig.cmake it finds toolchain for 2.8.0 and not 2.7.0

i tried to set -DNCS_TOOLCHAIN_VERSION=v2.7.0 instead of None in west call, but it did not help.

Any idea how to resolve it ?

If i remove 2.8.0 then everything goes back to normal, but i want the ability to move some of the new projects to 2.8.0 without docker.

Please advise.

Parents
  • eyal@eyal-ThinkPad-P15v-Gen-1:~/develop/scms/staging_area/dali_sniffer$ west build --build-dir /home/eyal/develop/scms/staging_area/dali_sniffer/build /home/eyal/develop/scms/staging_area/dali_sniffer --sysbuild --pristine -c --board nrf52_adafruit_feather/nrf52832 -- -DNCS_TOOLCHAIN_VERSION="v2.7.0"
    -- west build: making build dir /home/eyal/develop/scms/staging_area/dali_sniffer/build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /home/eyal/ncs/toolchains/e9dba88316/usr/local/bin/python3.9 (found suitable version "3.9.18", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /home/eyal/.cache/zephyr
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52_adafruit_feather, qualifiers: nrf52832
    Parsing /home/eyal/ncs/v2.7.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/home/eyal/develop/scms/staging_area/dali_sniffer/build/_sysbuild/empty.conf'
    Merged configuration '/home/eyal/develop/scms/staging_area/dali_sniffer/build/_sysbuild/empty.conf'
    Configuration saved to '/home/eyal/develop/scms/staging_area/dali_sniffer/build/zephyr/.config'
    Kconfig header saved to '/home/eyal/develop/scms/staging_area/dali_sniffer/build/_sysbuild/autoconf.h'
    -- 
       **********************************
       * Running CMake for dali_sniffer *
       **********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/eyal/develop/scms/staging_area/dali_sniffer
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.8.20241106.790718371940 for building. (/home/eyal/ncs/toolchains/b81a7cd864/cmake)
    CMake Error at /home/eyal/ncs/toolchains/e9dba88316/usr/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Python3 (missing: Interpreter) (Required is at least version
      "3.8")
    

    Also i've verified the issue with a fresh new install on vm with ubuntu 22.04.5:
    installed vscode with the extensions.

    installed nrf command line tools

    installed nrfutil

    installed from vscode extension the ncs 2.7.0 toolchain and sdk.

    installed from vscode extension the ncs 2.8.0 toolchain.

    Made sure the extension shows clearly it uses 2.7.0 for sdk AND toolchain (set active).

    opened in vscode the zephyr blinky sample

    created a build config using vscode extension for nrf52832 (adafruit) with debug symbols using sysbuild.

    The build fails, it does  starts out with the 2.7.0 toolchain but when it get to --using ncs version... it shows it chose 2.8 toolchain.

    Another edit:

    So i'm building using sysbuild and not a regular build so cmake is calling sysbuild and not my cmake right away. i found the sysbuild script that was bing called and added:

    message("@@@@@@@ NCS_TOOLCHAIN_VERSION: ${NCS_TOOLCHAIN_VERSION}")

    it prints "NONE" or v2.7.0 whatever i pass in -D.
    but when i add the same print in my CMakeLists.txt, ${NCS_TOOLCHAIN_VERSION} is empty. That means the sysbuild does not pass my -D variable on to my cmake file and thus to my zephyr build, so i tried to add name space like blinky_NCS_TOOLCHAIN_VERSION=NONE but it did not help.
    last update, i'm stopping my research with that...
    i set NCS_TOOLCHAIN_VERSION to 2.7.0 in my CMakeLists.txt so i know it is taken into account in my build.
    but now it fails in the findpackage call, like before, it tries to use python from 2.8.0 toolchain while all pathes are pointing to 2.7.0 toolchain.
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: /home/eyal/ncs/v2.7.0/zephyr/samples/basic/blinky
    -- CMake version: 3.21.0
    ##### NCS_TOOLCHAIN_VERSION: 2.7.0
    setting minium version to the required version
    will try to find package
    CMake Error at /home/eyal/ncs/toolchains/e9dba88316/usr/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Python3 (missing: Interpreter) (Required is at least version
      "3.8")
    
          Reason given by package: 
              Interpreter: Cannot run the interpreter "/home/eyal/ncs/toolchains/b81a7cd864/usr/local/bin/python3"
Reply
  • eyal@eyal-ThinkPad-P15v-Gen-1:~/develop/scms/staging_area/dali_sniffer$ west build --build-dir /home/eyal/develop/scms/staging_area/dali_sniffer/build /home/eyal/develop/scms/staging_area/dali_sniffer --sysbuild --pristine -c --board nrf52_adafruit_feather/nrf52832 -- -DNCS_TOOLCHAIN_VERSION="v2.7.0"
    -- west build: making build dir /home/eyal/develop/scms/staging_area/dali_sniffer/build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /home/eyal/ncs/toolchains/e9dba88316/usr/local/bin/python3.9 (found suitable version "3.9.18", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: /home/eyal/.cache/zephyr
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52_adafruit_feather, qualifiers: nrf52832
    Parsing /home/eyal/ncs/v2.7.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/home/eyal/develop/scms/staging_area/dali_sniffer/build/_sysbuild/empty.conf'
    Merged configuration '/home/eyal/develop/scms/staging_area/dali_sniffer/build/_sysbuild/empty.conf'
    Configuration saved to '/home/eyal/develop/scms/staging_area/dali_sniffer/build/zephyr/.config'
    Kconfig header saved to '/home/eyal/develop/scms/staging_area/dali_sniffer/build/_sysbuild/autoconf.h'
    -- 
       **********************************
       * Running CMake for dali_sniffer *
       **********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/eyal/develop/scms/staging_area/dali_sniffer
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.8.20241106.790718371940 for building. (/home/eyal/ncs/toolchains/b81a7cd864/cmake)
    CMake Error at /home/eyal/ncs/toolchains/e9dba88316/usr/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Python3 (missing: Interpreter) (Required is at least version
      "3.8")
    

    Also i've verified the issue with a fresh new install on vm with ubuntu 22.04.5:
    installed vscode with the extensions.

    installed nrf command line tools

    installed nrfutil

    installed from vscode extension the ncs 2.7.0 toolchain and sdk.

    installed from vscode extension the ncs 2.8.0 toolchain.

    Made sure the extension shows clearly it uses 2.7.0 for sdk AND toolchain (set active).

    opened in vscode the zephyr blinky sample

    created a build config using vscode extension for nrf52832 (adafruit) with debug symbols using sysbuild.

    The build fails, it does  starts out with the 2.7.0 toolchain but when it get to --using ncs version... it shows it chose 2.8 toolchain.

    Another edit:

    So i'm building using sysbuild and not a regular build so cmake is calling sysbuild and not my cmake right away. i found the sysbuild script that was bing called and added:

    message("@@@@@@@ NCS_TOOLCHAIN_VERSION: ${NCS_TOOLCHAIN_VERSION}")

    it prints "NONE" or v2.7.0 whatever i pass in -D.
    but when i add the same print in my CMakeLists.txt, ${NCS_TOOLCHAIN_VERSION} is empty. That means the sysbuild does not pass my -D variable on to my cmake file and thus to my zephyr build, so i tried to add name space like blinky_NCS_TOOLCHAIN_VERSION=NONE but it did not help.
    last update, i'm stopping my research with that...
    i set NCS_TOOLCHAIN_VERSION to 2.7.0 in my CMakeLists.txt so i know it is taken into account in my build.
    but now it fails in the findpackage call, like before, it tries to use python from 2.8.0 toolchain while all pathes are pointing to 2.7.0 toolchain.
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: /home/eyal/ncs/v2.7.0/zephyr/samples/basic/blinky
    -- CMake version: 3.21.0
    ##### NCS_TOOLCHAIN_VERSION: 2.7.0
    setting minium version to the required version
    will try to find package
    CMake Error at /home/eyal/ncs/toolchains/e9dba88316/usr/local/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Python3 (missing: Interpreter) (Required is at least version
      "3.8")
    
          Reason given by package: 
              Interpreter: Cannot run the interpreter "/home/eyal/ncs/toolchains/b81a7cd864/usr/local/bin/python3"
Children
No Data
Related