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

[BUG] [Python] fatal error: zap-generated/CHIPClusters.h: No such file or directory` #25963

Open
lboue opened this issue Apr 4, 2023 · 2 comments
Labels

Comments

@lboue
Copy link
Contributor

lboue commented Apr 4, 2023

Reproduction steps

Reproduction steps:

Build the Python/C library:

cd ~/connectedhomeip/
git submodule update --init
source scripts/activate.sh

./scripts/build_python_device.sh --chip_detail_logging true

sudo su # dhclient is called, needs root
source ./out/python_env/bin/activate

Error

FAILED: obj/src/app/clusters/ota-requestor/lighting-common.DefaultOTARequestor.cpp.o
g++ -MMD -MF obj/src/app/clusters/ota-requestor/lighting-common.DefaultOTARequestor.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/x86_64-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 -Igen/examples/lighting-app/lighting-common/zapgen -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 -c ../../src/app/clusters/ota-requestor/DefaultOTARequestor.cpp -o obj/src/app/clusters/ota-requestor/lighting-common.DefaultOTARequestor.cpp.o
../../src/app/clusters/ota-requestor/DefaultOTARequestor.cpp:30:10: fatal error: zap-generated/CHIPClusters.h: No such file or directory
   30 | #include <zap-generated/CHIPClusters.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Bug prevalence

always

GitHub hash of the SDK that was being used

d81d4e3

Platform

python

Platform Version(s)

Ubuntu 22.04.2 LTS (GNU/Linux 5.19.0-38-generic x86_64)

Anything else?

Log file:
build_python_device.log

@lboue lboue changed the title [BUG] [BUG] [Python] fatal error: zap-generated/CHIPClusters.h: No such file or directory` Apr 4, 2023
@lazeintech
Copy link

I got the same problem on Mac Intel

@glynd
Copy link

glynd commented Jun 29, 2023

Same on a Raspberry Pi 4 / Ubuntu
File appears to be under these paths:

./examples/thermostat/asr/include/CHIPClusters.h
./out/python_lib/gen/examples/lighting-app/lighting-common/zap_pregen/zap-generated/CHIPClusters.h
./scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClusters.h
./scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClusters.h

When compiling in folder:
./out/python_lib

Looks like the fix would be to add:

gen/examples/lighting-app/lighting-common/zap_pregen/

To the include path for the compile

Cheating as just mucking around - this seems to get past the error:
cd out/python_lib/gen/examples/lighting-app/lighting-common
ln -s zap_pregen/zap-generated/ .
cd -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants