Compilation error for matter projects

chillibandit
Posts: 2
Joined: Sun Sep 15, 2024 8:43 pm

Compilation error for matter projects

Postby chillibandit » Sun Sep 15, 2024 8:46 pm

When I compile an example matter project, it compiles without an error. But when i make a custom matter project there is an error when compiling.

Code: Select all

In file included from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/Decode.h:23,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/DecodableList.h:21,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h:28,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20:
../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/Nullable.h:40:8: note: declaration of 'struct chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum> >'
 struct Nullable : protected std::optional<T>
        ^~~~~~~~
In file included from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/DecodableList.h:22,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h:28,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20:
../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/Encode.h:204:34: error: invalid use of incomplete type 'const struct chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum> >'
     return Encode(writer, tag, x.Value());
                                ~~^~~~~
In file included from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/Decode.h:23,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/DecodableList.h:21,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h:28,
                 from ../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20:
../../../../../../esp/v4.4.8/esp-matter2/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/data-model/Nullable.h:40:8: note: declaration of 'struct chip::app::DataModel::Nullable<chip::app::DataModel::List<const chip::app::Clusters::UnitTesting::SimpleEnum> >'
 struct Nullable : protected std::optional<T>
        ^~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1


aliarifat794
Posts: 128
Joined: Sun Jun 23, 2024 6:18 pm

Re: Compilation error for matter projects

Postby aliarifat794 » Mon Sep 16, 2024 7:51 am

Your custom project should include all the necessary paths, libraries, and compiler options. Please compare the CMakeLists.txt or Makefile between the example project and your custom project.

chillibandit
Posts: 2
Joined: Sun Sep 15, 2024 8:43 pm

Re: Compilation error for matter projects

Postby chillibandit » Mon Sep 16, 2024 9:04 am

After some fixes, clean and built the thing.
Getting this error

Code: Select all

[663/1336] Performing configure step for 'chip_gn'
FAILED: esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-configure /home/ruwa/esp/v4.4.8/esp-matter/examples/light/build/esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-configure 
cd /home/ruwa/esp/v4.4.8/esp-matter/examples/light/build/esp-idf/chip && /home/ruwa/esp/v4.4.8/esp-matter/connectedhomeip/connectedhomeip/.environment/cipd/packages/pigweed/gn --root=/home/ruwa/esp/v4.4.8/esp-matter/connectedhomeip/connectedhomeip/config/esp32 gen --check --fail-on-unused-args /home/ruwa/esp/v4.4.8/esp-matter/examples/light/build/esp-idf/chip && /usr/bin/cmake -E touch /home/ruwa/esp/v4.4.8/esp-matter/examples/light/build/esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-configure
ERROR Unresolved dependencies.
//third_party/connectedhomeip/src/crypto:public_headers(//third_party/connectedhomeip/config/esp32/toolchain:esp32)
  needs //third_party/connectedhomeip/src/lib/core:types(//third_party/connectedhomeip/config/esp32/toolchain:esp32)
//third_party/connectedhomeip/src/crypto/tests:tests_lib(//third_party/connectedhomeip/config/esp32/toolchain:esp32)
  needs //third_party/connectedhomeip/src/credentials:test_paa_store(//third_party/connectedhomeip/config/esp32/toolchain:esp32)
//third_party/connectedhomeip/src/crypto/tests:tests_lib(//third_party/connectedhomeip/config/esp32/toolchain:esp32)
  needs //third_party/connectedhomeip/src/lib/core:string-builder-adapters(//third_party/connectedhomeip/config/esp32/toolchain:esp32)



Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 231 guests