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))
      |                  ^~~~~~~~~~~~~~~~~

Parents
  • 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

  • Good morning from Norway,

    Do you see the same error with a pristine sample from the SDK, as well as your custom firmware based on the Matter template? How about other non-matter samples?

    What build configuration have you selected, i.e did you use west build with any other parameters added? If you've used the nRF Connect extension to build, could you post a screen shot of the build configuration?

    The error you're getting seems to be connected to the SPAKE2+ verifier specifically. 

      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/spake2p/spake2p.py", line 51, in generate_verifier
        return w0.to_bytes(NIST256p.baselen, byteorder='big') + L.to_bytes('uncompressed')
    AttributeError: 'Point' object has no attribute 'to_bytes'

    If you're using a SPAKE2+ from your 2.5 based custom project using Matter v1.1 into the NCS v2.6.0 using Matter v1.2, could you verify if anything has changed w.r.t formatting or other things? 

    Kind regards,
    Andreas

  • Hello again,

    I was able to perform the following experiment with the v2.6.0 SDK:

    1.  WELCOME -> Create a new application -> Copy a sample -> Matter Template

    2. Add Build Configuration
        Board = nrf52840dk_nrf52840
        Configuration = prj.conf
        Add Devicetree overlays:  boards/nrf52840dk_nrf52840.overlay

    3. Build Configuration

    I seem to get the same failure as last time:

    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.0-rc1/zephyr), build: v3.5.99-ncs1-rc1
    [173/173] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       26618 B        28 KB     92.84%
                 RAM:         18 KB       256 KB      7.03%
            IDT_LIST:          0 GB        32 KB      0.00%
    [11/732] Generating new Factory Data...
    FAILED: zephyr/factory_data.json /Users/puzl/nrf/template_1/build/zephyr/factory_data.json
    cd /Users/puzl/nrf/template_1/build/modules/connectedhomeip && /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py --sn 11223344556677889900 --date 2022-01-01 --vendor_id 65521 --product_id 32768 --vendor_name Nordic\ Semiconductor\ ASA --product_name not-specified --hw_ver 0 --hw_ver_str prerelease --dac_cert /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-DAC-FFF1-8000-Cert.der --dac_key /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-DAC-FFF1-8000-Key.der --pai_cert /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-PAI-FFF1-noPID-Cert.der --spake2_it 1000 --spake2_salt U1BBS0UyUCBLZXkgU2FsdA== --discriminator 0xF00 --passcode 20202021 --include_passcode --overwrite --product_finish other --generate_onboarding --enable_key 00112233445566778899AABBCCDDEEFF -o /Users/puzl/nrf/template_1/build/zephyr/factory_data.json -s /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/nrfconnect_factory_data.schema
    [INFO] Generating SPAKE2+ Verifier...
    Traceback (most recent call last):
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 577, in <module>
        main()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 573, in main
        generator.generate_json()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 277, in generate_json
        spake_2_verifier = self._generate_spake2_verifier()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 380, in _generate_spake2_verifier
        return generate_verifier(self._args.passcode, self._args.spake2_salt, self._args.spake2_it)
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/spake2p/spake2p.py", line 51, in generate_verifier
        return w0.to_bytes(NIST256p.baselen, byteorder='big') + L.to_bytes('uncompressed')
    AttributeError: 'Point' object has no attribute 'to_bytes'

    Any further thoughts?

    Thanks,
    Gene

  • I have a similar issue:

    [22:08:04] nRF Command Line Tools 10.24.0 are up to date
    [22:08:09] =========== Toolchain validation report for nRF Connect SDK Toolchain v2.6.0 ===========
    Package Using the nRF Connect SDK v2.6.0 at /home/kammutierspule/ncs/v2.6.0
    Clock3 dtc is outdated. Found 1.5.0, but 1.5.1-1 is required by the SDK.
  • Hi Gene,

    Gene Roylance said:
    2. Add Build Configuration
        Board = nrf52840dk_nrf52840
        Configuration = prj.conf
        Add Devicetree overlays:  boards/nrf52840dk_nrf52840.overlay

    In step 2: You don't need to specify the configuration and the device tree overlay. If you use "System default", then the build system will use the prj.conf that exists in the source folder. Next it will look at the board you've selected, and if it is a board file that is supported in the SDK out of the box, it will use the default board files located in https://github.com/nrfconnect/sdk-zephyr/tree/main/boards/arm/, for instance the nRF52840DK

    After it has found this board, it will use this to configure the board and next look for any overlay files within your project. The build system will always use <your_board>.overlay if it exists. In this case it does exist within boards/nrf52840dk.nrf52840.overlay, so it will automatically be included.

    This is explained in greater detail under the Configuration and building pages in our documentation as well as in our academy pages, more specifically in the first 3 lessons in https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/ 

    When you at a later point in time might get to adding a custom board to your projects, we also have documentation for this. Lesson 3 in the intermediate course also shows how to do this: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/ 

    The following configuration resulted in a successful build with no warnings on my end (Windows 10, NCS 2.6.0, Toolchain v2.6.0):

    Let me know if you are successful with building the Matter template sample with a similar build configuration as showed in the image above

    Kind regards,
    Andreas

  • Hi kammutierspule, 

    Could you please create a new case and raise your question there with more details.

    Kind regards,
    Andreas

Reply Children
No Data
Related