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.

  • 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"
  • Hello,

    I am sorry for the late reply. How did you install NCS and the toolchain? 

    Is it possible to upload the application that triggers this issue, so that I may have a look, and see if I can replicate the issue or not?

    Best regards,

    Edvin

  • Hi Edvin!

    Please check above i have described in details how i installed things from scratch on a VM with ubuntu 22.04.5.
    as for your questions:

    1. i installed all toolchains and SDKs using vs code plugin.

    2. i have installed 2.7.0 first and then i installed JUST the 2.8.0 toolchain, i never installed the SDK.

    3. i run a zephyr blinky sample from the 2.7.0 sdk, i didn't change configuration. Anyone can replicate it.

    Eyal.

  • Hello Eyal,

    I understand. I see that this is actually an issue. I can't replicate it on Windows, but I see that it has been reported on Ubuntu. I will dig a bit more into this, to see if we have any proper workaround.

    As a temporary workaround, can you try building your application in 2.8.0? I think it should be able to build the applications from 2.7.0.

    Best regards,

    Edvin

  • Hello again,

    It seems this bug was indeed fixed, but it requires you to check out a different commit than the standard 2.7.0.

    IF you want to build v2.7.0 while having the v2.8.0 toolchain present, and trying to specify the NCS_TOOLCHAIN_VERSION, then you need to use this commit:

    https://github.com/nrfconnect/sdk-nrf/commit/c256a1d5f3e7c8cdd6c874d9ff114ff22fb142df

    For more details, please check: https://github.com/nrfconnect/sdk-nrf/pull/17399

    Best regards,

    Edvin

Related