Error building Matter: light bulb with cluster color control

Hi, we need add the cluster color control to the project light bulb.

After add the build config and build the project for the firs time it build successfull:

But when change the line 8193 ( "enabled": 1 ) and do pristin build the terminal shows this error:

This the terminal output text:

 *  Executing task: nRF Connect: Build: LightBulb250Color/build (active) 

Building LightBulb250Color
west build --build-dir d:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/build d:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color

[0/32] Performing build step for 'chip-gn'
Starting Matter library build in D:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/build/modules/connectedhomeip
Done. Made 198 targets from 186 files in 284ms
ninja: no work to do.
Matter library build complete
[1/30] Performing build step for 'multiprotocol_rpmsg_subimage'
[0/5] Performing build step for 'b0n_subimage'
ninja: no work to do.
[2/24] Performing build step for 'mcuboot_subimage'
ninja: no work to do.
[4/22] Building CXX object CMakeFiles/app.dir/C_/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp.obj
FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp.obj
C:\ncs\toolchains\c1a76fddb2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-g++.exe -DCHIP_BYPASS_IDL -DCHIP_HAVE_CONFIG_H -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FIL
E=\"nrf-config-user.h\" -DNRF5340_XXAA_APPLICATION -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CARRIER_FUNCTIONS_ENABLED=0 -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=1 -DNRF_8021
54_ENERGY_DETECTED_VERSION=1 -DNRF_802154_IE_WRITER_ENABLED=1 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES="" -DNRF_802154_PENDING_SHORT_ADDRESSES="" -DNRF_802154
_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=1 -DNRF_802154_SERIALIZATION_HOST=1 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DNRF_SKIP_FICR_
NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -ID:/ABTC/ABTC_Boards
/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/src -IC:/ncs/v2.5.0/nrf/samples/matter/common/src -IC:/ncs/v2.5.0/modules/lib/matter/third_party/nlio/repo/include -IC:/ncs/v2.5.0/modules/li
b/matter/zzz_generated/app-common -ID:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/src/zap-generated -IC:/ncs/v2.5.0/zephyr/include -ID:/ABTC/ABTC_Boards/ABTC_Wally/abtc
_wally/FW_IMINOK_2023_57/LightBulb250Color/build/zephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/lib/libc/newlib/include -IC:/ncs/v2.5.0/zephyr/soc/arm/
nordic_nrf/common/. -IC:/ncs/v2.5.0/zephyr/subsys/bluetooth -IC:/ncs/v2.5.0/zephyr/subsys/net/lib/sockets/. -IC:/ncs/v2.5.0/zephyr/subsys/settings/include -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/n
rf/tests/include -IC:/ncs/v2.5.0/zephyr/modules/openthread/platform/. -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrf
x -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -ID:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IM
INOK_2023_57/LightBulb250Color/build/modules/libmetal/libmetal/lib/include -IC:/ncs/v2.5.0/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.5.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.5.
0/modules/lib/zcbor/include -IC:/ncs/v2.5.0/nrfxlib/nfc/include -IC:/ncs/v2.5.0/nrfxlib/openthread/include -ID:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/build/modules
/nrf/subsys/nrf_security/src/include/generated -IC:/ncs/v2.5.0/nrf/subsys/nrf_security/include -IC:/ncs/v2.5.0/nrf/ext/oberon/psa/core/include -IC:/ncs/v2.5.0/nrf/ext/oberon/psa/core/library -IC:/ncs/
v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/modules/crypto/mbedtls/library -IC:/ncs/v2.5.0/nrfxlib/crypto/nrf_oberon/include -IC:/ncs/v2.5.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/nc
s/v2.5.0/nrf/ext/oberon/psa/drivers -IC:/ncs/v2.5.0/nrfxlib/nrf_802154/serialization/include -IC:/ncs/v2.5.0/nrfxlib/nrf_802154/serialization/include/platform -IC:/ncs/v2.5.0/nrfxlib/nrf_802154/serial
ization/include/serialization -IC:/ncs/v2.5.0/nrfxlib/nrf_802154/common/include -IC:/ncs/v2.5.0/nrfxlib/softdevice_controller/include -IC:/ncs/v2.5.0/modules/lib/matter/src -IC:/ncs/v2.5.0/modules/lib
/matter/src/include -IC:/ncs/v2.5.0/modules/lib/matter/third_party/nlassert/repo/include -ID:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/build/modules/connectedhomeip/g
en/include -IC:/ncs/v2.5.0/modules/lib/matter/examples/providers -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/Addre
ssResolve_DefaultImpl.h>" -fno-strict-aliasing -Os -fcheck-new -std=c++14 -fno-exceptions -fno-rtti -imacros D:/ABTC/ABTC_Boards/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color/build/zephyr/
include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/
c1a76fddb2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wpointer-arit
h -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=D:/ABTC/ABTC_Boa
rds/ABTC_Wally/abtc_wally/FW_IMINOK_2023_57/LightBulb250Color=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fda
ta-sections -specs=nano.specs -D_POSIX_THREADS -std=gnu++17 -D_SYS__PTHREADTYPES_H_ -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-serv
er.cpp.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\modules\lib\matter\src\app\clusters\color-control-server\color-control-server.cpp.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/modules/lib/matter/src/app/c
lusters/color-control-server/color-control-server.cpp.obj -c C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp
In file included from C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp:18:
C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.h:256:37: error: 'EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT' was not declared in this scope; did
you mean 'EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT'?
  256 |     EmberEventControl eventControls[EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT];
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT
C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.h:256:37: note: maximum limit of 1000 namespaces searched for 'EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOIN
T_COUNT'
In file included from C:/ncs/v2.5.0/modules/lib/matter/src/system/SystemLayer.h:33,
                 from C:/ncs/v2.5.0/modules/lib/matter/src/lib/core/CHIPCore.h:30,
                 from C:/ncs/v2.5.0/modules/lib/matter/src/lib/core/Optional.h:28,
                 from C:/ncs/v2.5.0/modules/lib/matter/src/app/ConcreteAttributePath.h:23,
                 from C:/ncs/v2.5.0/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h:27,
                 from C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.h:20:
C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp: In member function 'EmberEventControl* ColorControlServer::getEventControl(chip::EndpointId)':
C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp:307:27: error: 'eventControls' was not declared in this scope; did you mean 'getEventControl'?
  307 |     if (index < ArraySize(eventControls))
      |                           ^~~~~~~~~~~~~
C:/ncs/v2.5.0/modules/lib/matter/src/lib/support/CodeUtils.h:705:30: note: in definition of macro 'ArraySize'
  705 | #define ArraySize(a) (sizeof(a) / sizeof((a)[0]))
      |                              ^
C:/ncs/v2.5.0/modules/lib/matter/src/app/clusters/color-control-server/color-control-server.cpp:307:27: note: maximum limit of 1000 namespaces searched for 'eventControls'
  307 |     if (index < ArraySize(eventControls))
      |                           ^~~~~~~~~~~~~
C:/ncs/v2.5.0/modules/lib/matter/src/lib/support/CodeUtils.h:705:30: note: in definition of macro 'ArraySize'
  705 | #define ArraySize(a) (sizeof(a) / sizeof((a)[0]))
      |                              ^
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c1a76fddb2\opt\bin\cmake.EXE' --build 'd:\ABTC\ABTC_Boards\ABTC_Wally\abtc_wally\FW_IMINOK_2023_57\LightBulb250Color\build'

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

We use this config to build it.

Please, Could tell us whi happen this, or what are we doing wrong?

Regards and many thanks in advance.

Related