project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.39k stars 1.98k forks source link

[1.3] chef-rvc-mode-delegate.cpp:115:115: error: ‘kOnOff’ is not a member of ‘chip::app::Clusters::RvcRunMode::Feature’ #33958

Closed lboue closed 1 month ago

lboue commented 3 months ago

Reproduction steps

Hello,

I am facing error building Chef RVC Linux app from v1.3-branch branch :

cd connectedhomeip/
source scripts/activate.sh
./examples/chef/chef.py -t linux -d rootnode_roboticvacuumcleaner_1807ff0c49 -b

Regards

Bug prevalence

always

GitHub hash of the SDK that was being used

d83caf7fefeaa91ebc549863552050311abe46ae

Platform

other

Platform Version(s)

Linux

Type

Platform Issue

Anything else?

rootnode_roboticvacuumcleaner_1807ff0c49.log

user@Matter:~/connectedhomeip/examples/chef$ ./chef.py -t linux -d rootnode_roboticvacuumcleaner_1807ff0c49 -b

  ______  __    __   _______  _______
 /      ||  |  |  | |   ____||   ____|
|  ,----'|  |__|  | |  |__   |  |__
|  |     |   __   | |   __|  |   __|
|  `----.|  |  |  | |  |____ |  |
 \______||__|  |__| |_______||__|

Target is set to rootnode_roboticvacuumcleaner_1807ff0c49
Setting up environment...
/home/user/connectedhomeip/examples/chef/../..//scripts/activate.sh: line 116: scripts/setup/gen_pigweed_cipd_json.py: No such file or directory

  WELCOME TO...

         █
         █
     ▄   █   ▄                                █     █
     ▀▀█████▀▀      ▄▀▀▀▄ ▄▀▀▀▄    ▄▀▀▀▀▄█  ▀▀█▀▀▀▀▀█▀▀   ▄▀▀▀▀▄    ▄▀▀
   ▀█▄       ▄█▀   █     █     █  █      █    █     █    █▄▄▄▄▄▄█  █   
     ▀█▄   ▄█▀     █     █     █  █      █    █     █    █         █   
  ▄██▀▀█   █▀▀██▄  █     █     █   ▀▄▄▄▄▀█    ▀▄▄   ▀▄▄   ▀▄▄▄▄▀   █   
 ▀▀    █   █    ▀▀

  ACTIVATOR! This sets your shell environment variables.

Activating environment (setting environment variables):

  Setting environment variables for CIPD package manager...done
  Setting environment variables for Project actions........skipped
  Setting environment variables for Python environment.....done
  Setting environment variables for pw packages............skipped
  Setting environment variables for Host tools.............done

Checking the environment:

20240617 22:06:51 INF Environment passes all checks!

Environment looks good, you are ready to go!

RPC PW disabled
Software Version String: ""
Product ID 0x8000 / Vendor ID 0xFFF1
Building...
x86_64
Done. Made 3640 targets from 290 files in 298ms
ninja: Entering directory `out'
[2/8] c++ obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-mode-delegate.cpp.o
FAILED: obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-mode-delegate.cpp.o 
g++ -MMD -MF obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-mode-delegate.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 -Wundef -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 -fmacro-prefix-map=../third_party/connectedhomeip/= -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++17 -fno-rtti -Wnon-virtual-dtor -DCHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID=65521 -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID=32768 -DCONFIG_ENABLE_PW_RPC=0 -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME=\"TEST_PRODUCT\" -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 -DENABLE_CHIP_SHELL -DOPENTHREAD_CONFIG_CLI_TRANSPORT=OT_CLI_TRANSPORT_CONSOLE -DCHIP_SHELL_ENABLE_CMD_SERVER=false -I../include -I/home/user/connectedhomeip/examples/chef/common -I/home/user/connectedhomeip/examples/chef/common/clusters -Igen -Igen/zapgen -I../third_party/connectedhomeip/src/include -I../third_party/connectedhomeip/src -Igen/include -I../third_party/connectedhomeip/examples/chef/linux/include -I../third_party/connectedhomeip/config/standalone -I../third_party/connectedhomeip/zzz_generated/app-common -I../third_party/connectedhomeip/third_party/nlassert/repo/include -I../third_party/connectedhomeip/third_party/nlio/repo/include -I../third_party/connectedhomeip/third_party/inipp/repo/inipp -I../third_party/connectedhomeip/examples/platform/linux -I/home/user/connectedhomeip/examples/chef/shell_common -I/home/user/connectedhomeip/examples/chef/shell_common/include -I../third_party/connectedhomeip/src/lib/shell -c /home/user/connectedhomeip/examples/chef/common/chef-rvc-mode-delegate.cpp -o obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-mode-delegate.cpp.o
/home/user/connectedhomeip/examples/chef/common/chef-rvc-mode-delegate.cpp: In function ‘void emberAfRvcRunModeClusterInitCallback(chip::EndpointId)’:
/home/user/connectedhomeip/examples/chef/common/chef-rvc-mode-delegate.cpp:115:115: error: ‘kOnOff’ is not a member of ‘chip::app::Clusters::RvcRunMode::Feature’
  115 |         new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kOnOff));
      |                                                                                                                   ^~~~~~
/home/user/connectedhomeip/examples/chef/common/chef-rvc-mode-delegate.cpp: In function ‘void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId)’:
/home/user/connectedhomeip/examples/chef/common/chef-rvc-mode-delegate.cpp:206:121: error: ‘kOnOff’ is not a member of ‘chip::app::Clusters::RvcCleanMode::Feature’
  206 |         new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcCleanMode::Feature::kOnOff));
      |                                                                                                                         ^~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
[3/8] c++ obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-operational-state-delegate.cpp.o
FAILED: obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-operational-state-delegate.cpp.o 
g++ -MMD -MF obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-operational-state-delegate.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 -Wundef -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 -fmacro-prefix-map=../third_party/connectedhomeip/= -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++17 -fno-rtti -Wnon-virtual-dtor -DCHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID=65521 -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID=32768 -DCONFIG_ENABLE_PW_RPC=0 -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME=\"TEST_PRODUCT\" -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 -DENABLE_CHIP_SHELL -DOPENTHREAD_CONFIG_CLI_TRANSPORT=OT_CLI_TRANSPORT_CONSOLE -DCHIP_SHELL_ENABLE_CMD_SERVER=false -I../include -I/home/user/connectedhomeip/examples/chef/common -I/home/user/connectedhomeip/examples/chef/common/clusters -Igen -Igen/zapgen -I../third_party/connectedhomeip/src/include -I../third_party/connectedhomeip/src -Igen/include -I../third_party/connectedhomeip/examples/chef/linux/include -I../third_party/connectedhomeip/config/standalone -I../third_party/connectedhomeip/zzz_generated/app-common -I../third_party/connectedhomeip/third_party/nlassert/repo/include -I../third_party/connectedhomeip/third_party/nlio/repo/include -I../third_party/connectedhomeip/third_party/inipp/repo/inipp -I../third_party/connectedhomeip/examples/platform/linux -I/home/user/connectedhomeip/examples/chef/shell_common -I/home/user/connectedhomeip/examples/chef/shell_common/include -I../third_party/connectedhomeip/src/lib/shell -c /home/user/connectedhomeip/examples/chef/common/chef-rvc-operational-state-delegate.cpp -o obj/ABS_PATH/home/user/connectedhomeip/examples/chef/common/rootnode_roboticvacuumcleaner_1807ff0c49.chef-rvc-operational-state-delegate.cpp.o
/home/user/connectedhomeip/examples/chef/common/chef-rvc-operational-state-delegate.cpp: In function ‘void emberAfRvcOperationalStateClusterInitCallback(chip::EndpointId)’:
/home/user/connectedhomeip/examples/chef/common/chef-rvc-operational-state-delegate.cpp:164:131: error: no matching function for call to ‘chip::app::Clusters::RvcOperationalState::Instance::Instance(chip::app::Clusters::RvcOperationalState::RvcOperationalStateDelegate*&, chip::EndpointId&)’
  164 |     gRvcOperationalStateInstance        = new RvcOperationalState::Instance(gRvcOperationalStateDelegate, operationalStateEndpoint);
      |                                                                                                                                   ^
In file included from /home/user/connectedhomeip/examples/chef/common/chef-rvc-operational-state-delegate.h:22,
                 from /home/user/connectedhomeip/examples/chef/common/chef-rvc-operational-state-delegate.cpp:22:
../third_party/connectedhomeip/src/app/clusters/operational-state-server/operational-state-server.h:384:5: note: candidate: ‘chip::app::Clusters::RvcOperationalState::Instance::Instance(chip::app::Clusters::RvcOperationalState::Delegate*, chip::EndpointId)’
  384 |     Instance(Delegate * aDelegate, EndpointId aEndpointId) :
      |     ^~~~~~~~
../third_party/connectedhomeip/src/app/clusters/operational-state-server/operational-state-server.h:384:25: note:   no known conversion for argument 1 from ‘chip::app::Clusters::RvcOperationalState::RvcOperationalStateDelegate*’ to ‘chip::app::Clusters::RvcOperationalState::Delegate*’
  384 |     Instance(Delegate * aDelegate, EndpointId aEndpointId) :
      |              ~~~~~~~~~~~^~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
[5/8] c++ obj/rootnode_roboticvacuumcleaner_1807ff0c49.main.cpp.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/user/connectedhomeip/examples/chef/./chef.py", line 1011, in <module>
    sys.exit(main())
  File "/home/user/connectedhomeip/examples/chef/./chef.py", line 872, in main
    shell.run_cmd("ninja -C out")
  File "/home/user/connectedhomeip/examples/chef/stateful_shell.py", line 139, in run_cmd
    raise RuntimeError(
RuntimeError: Error. Nonzero return code.
Returncode: 1
Cmd: ninja -C out
bzbarsky-apple commented 3 months ago

This feature value was removed from the spec.

lboue commented 3 months ago

@bzbarsky-apple Shouldn't the code be changed accordingly when the specialisation evolves? Moreover, why were there any changes in the v1.3 branch when the specifications are now public?

bzbarsky-apple commented 3 months ago

Shouldn't the code be changed accordingly when the specialisation evolves?

Yes. But it wasn't in this case, which is why you are hitting this problem. To be clear, I am not saying the non-compiling is OK, just why it's happening. Whoever maintains the chef stuff or otherwise cares about it needs to fix it.

Moreover, why were there any changes in the v1.3 branch when the specifications are now public?

That's a question for the RVC people and @robszewczyk

lboue commented 1 month ago

This now works with the latest commit:

$ ./examples/chef/chef.py -t linux -d rootnode_roboticvacuumcleaner_1807ff0c49 -b

  ______  __    __   _______  _______
 /      ||  |  |  | |   ____||   ____|
|  ,----'|  |__|  | |  |__   |  |__
|  |     |   __   | |   __|  |   __|
|  `----.|  |  |  | |  |____ |  |
 \______||__|  |__| |_______||__|

Target is set to rootnode_roboticvacuumcleaner_1807ff0c49
Setting up environment...

  WELCOME TO...

         █
         █
     ▄   █   ▄                                █     █
     ▀▀█████▀▀      ▄▀▀▀▄ ▄▀▀▀▄    ▄▀▀▀▀▄█  ▀▀█▀▀▀▀▀█▀▀   ▄▀▀▀▀▄    ▄▀▀
   ▀█▄       ▄█▀   █     █     █  █      █    █     █    █▄▄▄▄▄▄█  █   
     ▀█▄   ▄█▀     █     █     █  █      █    █     █    █         █   
  ▄██▀▀█   █▀▀██▄  █     █     █   ▀▄▄▄▄▀█    ▀▄▄   ▀▄▄   ▀▄▄▄▄▀   █   
 ▀▀    █   █    ▀▀

  ACTIVATOR! This sets your shell environment variables.

Activating environment (setting environment variables):

  Setting environment variables for CIPD package manager...done
  Setting environment variables for Project actions........skipped
  Setting environment variables for Python environment.....done
  Setting environment variables for pw packages............skipped
  Setting environment variables for Host tools.............done

Checking the environment:

20240828 07:47:18 INF Environment passes all checks!

Environment looks good, you are ready to go!

RPC PW disabled
Software Version String: ""
Product ID 0x8000 / Vendor ID 0xFFF1
Building...
x86_64
Generating compile_commands took 41ms
Done. Made 3665 targets from 295 files in 1313ms
ninja: Entering directory `out'
[70/70] stamp obj/default.stamp
Done