Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified ZAP file build error #904

Closed
mertmzk opened this issue Jan 23, 2023 · 3 comments
Closed

Modified ZAP file build error #904

mertmzk opened this issue Jan 23, 2023 · 3 comments
Labels
component: back-end Back-end work only, no user interface changes

Comments

@mertmzk
Copy link

mertmzk commented Jan 23, 2023

Hi,
I wanted to add different endpoints to the lighting example and here the steps I followed and it is giving error when try to build it:

1- Open a existing lighting zap template using Electron and added two additional datapoints
2- Generated zap files using the script ./scripts/tools/zap/generate.py and added them into the path for build
3- cd connectedhomeip

./scripts/checkout_submodules.py --shallow --platform linux

./scripts/build/gn_bootstrap.sh

source scripts/activate.sh
./scripts/build_python_device.sh --chip_detail_logging true

When I try to build the libraries for python getting this error: Does anyone have any suggestion how to fix this?

Checking the environment:

20230123 15:04:38 INF Environment passes all checks!

Environment looks good, you are ready to go!

Done. Made 6328 targets from 317 files in 1902ms
ninja: Entering directory `./out/python_lib'
[1/5] aarch64-linux-gnu-g++ -MMD -MF obj/zzz_generated/lighting-app/test1/lighting-common.IMClusterCommandHandler.cpp.o.d -Wconversion -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wno-deprecated-declarations -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-unused-parameter -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1 -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\> -DCHIP_MINMDNS_USE_EPHEMERAL_UNICAST_PORT=1 -DCHIP_MINMDNS_HIGH_VERBOSITY=0 -DCHIP_MINMDNS_DEFAULT_POLICY=1 -I../../zzz_generated/lighting-app -Igen/examples/lighting-app/lighting-common -I../../src/include -I../../src -Igen/include -I../../zzz_generated/app-common -I../../config/standalone -I../../third_party/nlassert/repo/include -I../../third_party/nlio/repo/include -I../../third_party/nlfaultinjection/repo/include -I../../third_party/inipp/repo/inipp -I../../zzz_generated -c ../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp -o obj/zzz_generated/lighting-app/test1/lighting-common.IMClusterCommandHandler.cpp.o
FAILED: obj/zzz_generated/lighting-app/test1/lighting-common.IMClusterCommandHandler.cpp.o 
aarch64-linux-gnu-g++ -MMD -MF obj/zzz_generated/lighting-app/test1/lighting-common.IMClusterCommandHandler.cpp.o.d -Wconversion -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wno-deprecated-declarations -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-unused-parameter -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1 -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\> -DCHIP_MINMDNS_USE_EPHEMERAL_UNICAST_PORT=1 -DCHIP_MINMDNS_HIGH_VERBOSITY=0 -DCHIP_MINMDNS_DEFAULT_POLICY=1 -I../../zzz_generated/lighting-app -Igen/examples/lighting-app/lighting-common -I../../src/include -I../../src -Igen/include -I../../zzz_generated/app-common -I../../config/standalone -I../../third_party/nlassert/repo/include -I../../third_party/nlio/repo/include -I../../third_party/nlfaultinjection/repo/include -I../../third_party/inipp/repo/inipp -I../../zzz_generated -c ../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp -o obj/zzz_generated/lighting-app/test1/lighting-common.IMClusterCommandHandler.cpp.o
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp: In function ‘void chip::app::Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(chip::app::CommandHandler*, const chip::app::ConcreteCommandPath&, chip::TLV::TLVReader&)’:
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp:854:24: error: ‘chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider’ has not been declared
  854 |         case Commands::AnnounceOtaProvider::Id: {
      |                        ^~~~~~~~~~~~~~~~~~~
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp:855:23: error: ‘chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider’ has not been declared
  855 |             Commands::AnnounceOtaProvider::DecodableType commandData;
      |                       ^~~~~~~~~~~~~~~~~~~
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp:856:52: error: ‘commandData’ was not declared in this scope; did you mean ‘CommandDataIB’?
  856 |             TLVError = DataModel::Decode(aDataTlv, commandData);
      |                                                    ^~~~~~~~~~~
      |                                                    CommandDataIB
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp:856:52: note: maximum limit of 1000 namespaces searched for ‘commandData’
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp:860:21: error: ‘emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback’ was not declared in this scope; did you mean ‘emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback’?
  860 |                     emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     emberAfOtaSoftwareUpdateRequestorClusterAnnounceOTAProviderCallback
../../zzz_generated/lighting-app/test1/IMClusterCommandHandler.cpp:860:21: note: maximum limit of 1000 namespaces searched for ‘emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback’
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
ninja: build stopped: subcommand failed.
@tecimovic tecimovic added the component: back-end Back-end work only, no user interface changes label Jan 30, 2023
@brdandu
Copy link
Collaborator

brdandu commented Jan 30, 2023

Something seems off with the way we generate things in the commands.h template. I am wondering if you are running into this because AnnounceOtaProvider command is not enabled on the outgoing side and enabled for incoming. However build should not fail like this.

@bzbarsky-apple
Copy link
Contributor

Isn't this a duplicate of project-chip/connectedhomeip#24591 ?

@mertmzk
Copy link
Author

mertmzk commented Jan 30, 2023

@bzbarsky-apple yes this is duplicate, can be closed now.

@mertmzk mertmzk closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: back-end Back-end work only, no user interface changes
Projects
None yet
Development

No branches or pull requests

4 participants