SDK v2.5.99-dev1 has many compile errors

Hello,

I am working on a Mac mini, Apple M2 chipset, macOS Sonoma 14.2.1.   I am using Visual Studio Code Version: 1.86.2 (Universal) Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:42:13.651Z Electron: 27.2.3 ElectronBuildId: 26908389 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.2.0

I have been developing code on the nRF52840 DK for several months using SDK v2.5.0.   I recently downloaded SDK v2.5.99-dev1

After successfully building with SDK v2.5.0, I remove the build directory, change the active SDK to 2.5.99-dev1, create a new Build configuration (the same way I did for v2.5.0 SDK), and then build.   I get many compile errors like this:

../../../../../../../opt/nordic/ncs/v2.5.99-dev1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp: In member function 'CHIP_ERROR chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType::Decode(chip::TLV::TLVReader&)':
../../../../../../../opt/nordic/ncs/v2.5.99-dev1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20334:37: error: 'class chip::app::Clusters::detail::StructDecodeIterator' has no member named 'Next'
20334 |         auto __element = __iterator.Next();
      |                                     ^~~~
../../../../../../../opt/nordic/ncs/v2.5.99-dev1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20335:18: error: 'holds_alternative' is not a member of 'std'
20335 |         if (std::holds_alternative<CHIP_ERROR>(__element))
      |                  ^~~~~~~~~~~~~~~~~

  • Hi,

    I will look into this

    However the build error state that the Clusters and structs have changed since you last compiled it. Have you examined the changes from 2.5.99-dev1 and v2.5.0 w.r.t this aspect?

    Is your application custom or is it based on a sample found in the SDK? If so, which sample? Do you see the same thing if you try to take a sample from NCS v2.5.0 and compile it in the 2.5.99-dev tag?

    Kind regards,
    Andreas

  • Andreas,

    Thanks for the reply.  I will look at the release notes for version 2.5.99-dev1 branch and see there are any indications for the issue I am seeing.

    The code that I am building is based on the nrf/samples/matter/template sample code.

    Any other thoughts?

    Best Regards,
    Gene

  • Hi Gene,

    Great, let me know if you have any progress in tracking down the differences. There are a quite significant amount of changes in 2.5.0 and 2.6.0 w.r.t Matter, and among them are the adaptation of Matter v1.2 spec. 

    Since my initial reply we have also tagged v2.6.0-rc1 which should be both more stable and closer to the full release of NCS v2.6.0

    Kind regards,
    Andreas

  • Andreas,

    Thank you for the information.  I did notice that there was an option to install the v2.6.0-rc1 that showed up in my Visual Studio Code application.  I tried it out and it successfully installed.  However, at the end of the installation, I got these warnings:

    [17:53:17] =========== Toolchain validation report for nRF Connect SDK Toolchain v2.5.1 ===========
    Package Using the nRF Connect SDK v2.6.0-rc1 at /shared/ncs/v2.6.0-rc1
    Clock3 zephyr-sdk is outdated. Found 0.16.1, but 0.16.5 is required by the SDK.
    Clock3 cmake is outdated. Found 3.20.5, but 3.21.0 is required by the SDK.
    Clock3 west is outdated. Found 1.1.0, but 1.2.0 is required by the SDK.
    Clock3 python is outdated. Found 3.8.2, but 3.9.18 is required by the SDK.
    Clock3 ninja is outdated. Found 1.9.0, but 1.10.2 is required by the SDK.
    Clock3 dtc is outdated. Found 1.4.7, but 1.5.1-1 is required by the SDK.

    I am wondering if these outdated tools are contributing to the failures that I do experience when  trying out the v2.6.0-rc1 SDK.  I have spent some time searching your website for ways to manually update these tools, since there is not a v2.6.0 version of the Toolchain.  I have not been able to find a satisfactory answer.

    Would it be possible to provide me with instructions on how to update these tools (perhaps from a command-line tool)?

    Thanks so much,
    Gene

  • Hi Gene,

    It looks like you're validating the toolchain corresponding to nRF Connect SDK v2.5.1 with SDK v2.6.0 selected. Could you verify how it looks in the VS Code extension on your end? On my end it looks like this. I've installed and/or set the SDK version first, then Toolchain version.

    The installation should update every requirement when installing, but it looks like it has skipped this in your case (unless installing Toolchain for v2.6.0).

    An issue that typically happening on Windows (not sure how it is for MacOs) is that VSCode inherits the SDK and toolchain versions from a project that is in your workspace, so the first thing I would like you to do is to open VSCode and nRF Connect for VS Code extension without any NCS projects in the workspace and then try to set the SDK version and Toolchain version as in the image below.  Remove the installation you have present to make sure that you don't have any artifacts from there and select "Install SDK" before selecting toolchain.

     

    Alternatively you can install the SDK version through the Toolchain manager found in nRF Connect for Desktop.

    If you open the SDK through the toolchain manager, it should set both SDK and Toolchain version in the extension to match the instance you opened in the toolchain manager.

    Let me know if this resolves the issue

    Kind regards,
    Andreas

Related