[Matter]Configure vendor_id product_id failed

Hello, I try to config vendor id and product id according to https://docs.nordicsemi.com/bundle/ncs-2.0.2/page/nrf/ug_matter_configuring_protocol.html.

1) When I change vendor id and product id in prj.conf by adding "CONFIG_CHIP_VENDOR_ID=4987 CONFIG_CHIP_PRODUCT_ID=13", and try to compile, it shows error:

[474/490] Linking CXX static library app/libapp.a
[475/490] Linking CXX executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/zephyr_pre0.map
: && ccache /home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ -gdwarf-4 -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -Wl,--wrap=_malloc_r -Wl,--wrap=_calloc_r -Wl,--wrap=_realloc_r -Wl,--wrap=_free_r -Wl,-u,_ZN4chip5Shell6Engine11RunMainLoopEv zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -fuse-ld=bfd -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a zephyr/lib/libc/newlib/liblib__libc__newlib.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/lib/posix/liblib__posix.a zephyr/soc/soc/arm/nordic_nrf/libsoc__arm__nordic_nrf.a zephyr/subsys/random/libsubsys__random.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a zephyr/subsys/net/libsubsys__net.a zephyr/subsys/net/l2/openthread/libsubsys__net__ip__l2__openthread.a zephyr/subsys/net/ip/libsubsys__net__ip.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/entropy/libdrivers__entropy.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/hwinfo/libdrivers__hwinfo.a zephyr/drivers/ieee802154/libdrivers__ieee802154.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/pwm/libdrivers__pwm.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/dk_buttons_and_leds/lib..__nrf__lib__dk_buttons_and_leds.a modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a modules/nrf/subsys/bluetooth/controller/lib..__nrf__subsys__bluetooth__controller.a modules/nrf/subsys/nrf_security/src/zephyr/libmbedtls_zephyr.a modules/nrf/subsys/dfu/dfu_multi_image/lib..__nrf__subsys__dfu__dfu_multi_image.a modules/nrf/subsys/dfu/dfu_target/lib..__nrf__subsys__dfu__dfu_target.a modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a modules/nrf/subsys/mpsl/fem/lib..__nrf__subsys__mpsl__fem.a modules/nrf/subsys/nfc/ndef/lib..__nrf__subsys__nfc__ndef.a modules/nrf/subsys/nfc/lib/lib..__nrf__subsys__nfc__lib.a modules/nrf/subsys/ieee802154/lib..__nrf__subsys__ieee802154.a modules/nrf/drivers/mpsl/clock_control/lib..__nrf__drivers__mpsl__clock_control.a modules/nrf/drivers/mpsl/flash_sync/lib..__nrf__drivers__mpsl__flash_sync.a modules/nrf/drivers/mpsl/temp_nrf5/lib..__nrf__drivers__mpsl__temp_nrf5.a modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a modules/openthread/platform/libopenthread_platform.a modules/hal_nordic/nrf_802154/libnrf-802154-platform.a modules/nrfxlib/nrf_802154/nrf_802154/driver/libnrf-802154-driver.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/zcbor/libmodules__zcbor.a /home/gzp/ncs/v2.6.1/nrfxlib/openthread/lib/cortex-m4/hard-float/v1.3/ftd//libopenthread-ftd.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L"/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m+fp/hard" -L/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr -lgcc -Wl,--start-group modules/connectedhomeip/lib/libCHIP.a modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a -Wl,--end-group zephyr/kernel/libkernel.a zephyr/arch/common/libisr_tables.a modules/nrfxlib/nrf_802154/nrf_802154/common/libnrf-802154-common.a modules/hal_nordic/nrf_802154/libnrf-802154-platform.a /home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/sl/sl/lib/nRF52840/hard-float/libnrf-802154-sl.a -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -lstdc++ -Wl,-no-pie -lm -Wl,-lc -L"/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi"/lib/thumb/v7e-m+fp/hard -Wl,-lgcc -lc -specs=nano.specs modules/nrf/subsys/nrf_security/src/libmbedcrypto.a /home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.19.a /home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/liboberon_mbedtls_3.0.14.a modules/nrf/subsys/nrf_security/src/libmbedcrypto_base.a -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -lc /home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/liboberon_3.0.14.a /home/gzp/ncs/v2.6.1/nrfxlib/nfc/lib/cortex-m4/hard-float/libnfc_t2t.a /home/gzp/ncs/v2.6.1/nrfxlib/softdevice_controller/lib/cortex-m4/hard-float/libsoftdevice_controller_peripheral.a /home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/common/lib/cortex-m4/hard-float/libmpsl_fem_common.a /home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio/lib/cortex-m4/hard-float/libmpsl_fem_nrf21540_gpio.a /home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio_spi/lib/cortex-m4/hard-float/libmpsl_fem_nrf21540_gpio_spi.a /home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/simple_gpio/lib/cortex-m4/hard-float/libmpsl_fem_simple_gpio.a /home/gzp/ncs/v2.6.1/nrfxlib/mpsl/lib/cortex-m4/hard-float/libmpsl.a && cd /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E true
/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/connectedhomeip/lib/libCHIP.a(libCredentials.DeviceAttestationCredsExample.cpp.o): in function `chip::Credentials::Examples::(anonymous namespace)::ExampleDACProvider::GetDeviceAttestationCert(chip::Span<unsigned char>&)':
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/../../../../../../../modules/lib/matter/src/credentials/examples/DeviceAttestationCredsExample.cpp:57: undefined reference to `chip::DevelopmentCerts::kDacCert'
/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: modules/connectedhomeip/lib/libCHIP.a(libCredentials.DeviceAttestationCredsExample.cpp.o): in function `chip::Credentials::Examples::(anonymous namespace)::ExampleDACProvider::SignWithDeviceAttestationKey(chip::Span<unsigned char const> const&, chip::Span<unsigned char>&)':
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/../../../../../../../modules/lib/matter/src/credentials/examples/DeviceAttestationCredsExample.cpp:202: undefined reference to `chip::DevelopmentCerts::kDacPrivateKey'
/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/../../../../../../../modules/lib/matter/src/credentials/examples/DeviceAttestationCredsExample.cpp:202: undefined reference to `chip::DevelopmentCerts::kDacPublicKey'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake --build /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1

2)When I change vendor id and product id in prj.conf by revising specify path of CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h"

/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/**
* @file
* Example project configuration file for CHIP.
*
* This is a place to put application or project-specific overrides
* to the default configuration values for general CHIP features.
*
*/

#pragma once
#define CONFIG_CHIP_DEVICE_PRODUCT_ID=13
#define CONFIG_CHIP_DEVICE_VENDOR_ID=4987

it shows error:

cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
[45/372] c++ obj/src/app/server/libCHIPAppServer.CommissioningWindowManager.cpp.o
FAILED: obj/src/app/server/libCHIPAppServer.CommissioningWindowManager.cpp.o
ccache /home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ -MMD -MF obj/src/app/server/libCHIPAppServer.CommissioningWindowManager.cpp.o.d -Wconversion -mthumb -Os -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -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-unused -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -D_POSIX_C_SOURCE=200809 -DMBEDTLS_CONFIG_FILE=\<nrf-config.h\> -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\<nrf-psa-crypto-want-config.h\> -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\<nrf-psa-crypto-config.h\> -fmacro-prefix-map=../../../../../../../modules/lib/matter/= -std=gnu++17 -fno-rtti -Wnon-virtual-dtor -isystem/home/gzp/ncs/v2.6.1/nrf/drivers/mpsl/clock_control -isystem/home/gzp/ncs/v2.6.1/zephyr/include -isystem/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -isystem/home/gzp/ncs/v2.6.1/zephyr/lib/libc/newlib/include -isystem/home/gzp/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -isystem/home/gzp/ncs/v2.6.1/zephyr/subsys/bluetooth -isystem/home/gzp/ncs/v2.6.1/zephyr/subsys/settings/include -isystem/home/gzp/ncs/v2.6.1/nrf/include -isystem/home/gzp/ncs/v2.6.1/nrf/lib/multithreading_lock/. -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/bluetooth/controller/. -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/trusted_storage/include -isystem/home/gzp/ncs/v2.6.1/zephyr/drivers/flash -isystem/home/gzp/ncs/v2.6.1/nrf/tests/include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/openthread/platform/. -isystem/home/gzp/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/cmsis/. -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -isystem/home/gzp/ncs/v2.6.1/modules/lib/zcbor/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nfc/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/common/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/simple_gpio/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/include/protocol -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/include/protocol -isystem/home/gzp/ncs/v2.6.1/nrfxlib/openthread/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include -isystem/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/nrf/subsys/nrf_security/src/include/generated -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/nrf_security/include -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/core/include -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/core/library -isystem/home/gzp/ncs/v2.6.1/modules/crypto/mbedtls/include -isystem/home/gzp/ncs/v2.6.1/modules/crypto/mbedtls/library -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/ -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/drivers -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/driver/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/sl/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/common/include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/hal_nordic/nrf_802154/include -DKERNEL -D__ZEPHYR__=1 -D_FORTIFY_SOURCE=1 -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -DNRF52840_XXAA -DZCBOR_ASSERTS -fno-strict-aliasing -fcheck-new -std=c++17 -fno-exceptions -fno-rtti -imacros/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros/home/gzp/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -fno-pic -fno-pie --param=min-pagesize=0 -fmacro-prefix-map=/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/gzp/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/gzp/ncs/v2.6.1=WEST_TOPDIR -specs=nano.specs -D_POSIX_THREADS -std=gnu++17 -DNDEBUG -DCHIP_HAVE_CONFIG_H=1 -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\> -I../../../../../../../modules/lib/matter/src/include -I../../../../../../../modules/lib/matter/src -Igen/include -I../../../../../../../modules/lib/matter/zzz_generated/app-common -I../../../../../../../modules/lib/matter/third_party/nlassert/repo/include -I../../../../../../../modules/lib/matter/third_party/nlio/repo/include -c ../../../../../../../modules/lib/matter/src/app/server/CommissioningWindowManager.cpp -o obj/src/app/server/libCHIPAppServer.CommissioningWindowManager.cpp.o
In file included from ../../../../../../../modules/lib/matter/src/system/SystemConfig.h:55,
from ../../../../../../../modules/lib/matter/src/ble/BleConfig.h:43,
from ../../../../../../../modules/lib/matter/src/lib/core/CHIPConfig.h:42,
from ../../../../../../../modules/lib/matter/src/lib/core/CHIPError.h:31,
from ../../../../../../../modules/lib/matter/src/app/icd/ICDNotifier.h:20,
from ../../../../../../../modules/lib/matter/src/app/server/CommissioningWindowManager.cpp:18:
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:17:9: error: ISO C++11 requires whitespace after the macro name [-Werror]
17 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID=13
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:17: error: "CONFIG_CHIP_DEVICE_PRODUCT_ID" redefined [-Werror]
17 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID=13
|
In file included from <command-line>:
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:624: note: this is the location of the previous definition
624 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID 32773
|
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:18:9: error: ISO C++11 requires whitespace after the macro name [-Werror]
18 | #define CONFIG_CHIP_DEVICE_VENDOR_ID=4987
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:18: error: "CONFIG_CHIP_DEVICE_VENDOR_ID" redefined [-Werror]
18 | #define CONFIG_CHIP_DEVICE_VENDOR_ID=4987
|
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:622: note: this is the location of the previous definition
622 | #define CONFIG_CHIP_DEVICE_VENDOR_ID 65521
|
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
[46/372] c++ obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o
FAILED: obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o
ccache /home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ -MMD -MF obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o.d -Wconversion -mthumb -Os -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -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-unused -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -D_POSIX_C_SOURCE=200809 -DMBEDTLS_CONFIG_FILE=\<nrf-config.h\> -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\<nrf-psa-crypto-want-config.h\> -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\<nrf-psa-crypto-config.h\> -fmacro-prefix-map=../../../../../../../modules/lib/matter/= -std=gnu++17 -fno-rtti -Wnon-virtual-dtor -isystem/home/gzp/ncs/v2.6.1/nrf/drivers/mpsl/clock_control -isystem/home/gzp/ncs/v2.6.1/zephyr/include -isystem/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -isystem/home/gzp/ncs/v2.6.1/zephyr/lib/libc/newlib/include -isystem/home/gzp/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -isystem/home/gzp/ncs/v2.6.1/zephyr/subsys/bluetooth -isystem/home/gzp/ncs/v2.6.1/zephyr/subsys/settings/include -isystem/home/gzp/ncs/v2.6.1/nrf/include -isystem/home/gzp/ncs/v2.6.1/nrf/lib/multithreading_lock/. -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/bluetooth/controller/. -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/trusted_storage/include -isystem/home/gzp/ncs/v2.6.1/zephyr/drivers/flash -isystem/home/gzp/ncs/v2.6.1/nrf/tests/include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/openthread/platform/. -isystem/home/gzp/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/cmsis/. -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -isystem/home/gzp/ncs/v2.6.1/modules/lib/zcbor/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nfc/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/common/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/simple_gpio/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/include/protocol -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/include/protocol -isystem/home/gzp/ncs/v2.6.1/nrfxlib/openthread/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include -isystem/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/nrf/subsys/nrf_security/src/include/generated -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/nrf_security/include -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/core/include -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/core/library -isystem/home/gzp/ncs/v2.6.1/modules/crypto/mbedtls/include -isystem/home/gzp/ncs/v2.6.1/modules/crypto/mbedtls/library -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/ -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/drivers -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/driver/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/sl/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/common/include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/hal_nordic/nrf_802154/include -DKERNEL -D__ZEPHYR__=1 -D_FORTIFY_SOURCE=1 -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -DNRF52840_XXAA -DZCBOR_ASSERTS -fno-strict-aliasing -fcheck-new -std=c++17 -fno-exceptions -fno-rtti -imacros/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros/home/gzp/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -fno-pic -fno-pie --param=min-pagesize=0 -fmacro-prefix-map=/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/gzp/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/gzp/ncs/v2.6.1=WEST_TOPDIR -specs=nano.specs -D_POSIX_THREADS -std=gnu++17 -DNDEBUG -DCHIP_HAVE_CONFIG_H=1 -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\> -I../../../../../../../modules/lib/matter/src/include -I../../../../../../../modules/lib/matter/src -Igen/include -I../../../../../../../modules/lib/matter/zzz_generated/app-common -I../../../../../../../modules/lib/matter/third_party/nlassert/repo/include -I../../../../../../../modules/lib/matter/third_party/nlio/repo/include -c ../../../../../../../modules/lib/matter/src/app/InteractionModelEngine.cpp -o obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o
In file included from ../../../../../../../modules/lib/matter/src/system/SystemConfig.h:55,
from ../../../../../../../modules/lib/matter/src/ble/BleConfig.h:43,
from ../../../../../../../modules/lib/matter/src/lib/core/CHIPConfig.h:42,
from ../../../../../../../modules/lib/matter/src/lib/core/DataModelTypes.h:22,
from ../../../../../../../modules/lib/matter/src/access/RequestPath.h:21,
from ../../../../../../../modules/lib/matter/src/access/AccessControl.h:22,
from ../../../../../../../modules/lib/matter/src/app/InteractionModelEngine.h:28,
from ../../../../../../../modules/lib/matter/src/app/InteractionModelEngine.cpp:26:
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:17:9: error: ISO C++11 requires whitespace after the macro name [-Werror]
17 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID=13
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:17: error: "CONFIG_CHIP_DEVICE_PRODUCT_ID" redefined [-Werror]
17 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID=13
|
In file included from <command-line>:
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:624: note: this is the location of the previous definition
624 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID 32773
|
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:18:9: error: ISO C++11 requires whitespace after the macro name [-Werror]
18 | #define CONFIG_CHIP_DEVICE_VENDOR_ID=4987
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:18: error: "CONFIG_CHIP_DEVICE_VENDOR_ID" redefined [-Werror]
18 | #define CONFIG_CHIP_DEVICE_VENDOR_ID=4987
|
/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:622: note: this is the location of the previous definition
622 | #define CONFIG_CHIP_DEVICE_VENDOR_ID 65521
|
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
FAILED: modules/connectedhomeip/src/chip-gn-stamp/chip-gn-build modules/connectedhomeip/args.gn modules/connectedhomeip/build.ninja modules/connectedhomeip/.ninja_deps modules/connectedhomeip/build.ninja.stamp modules/connectedhomeip/lib/libCHIP.a modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/src/chip-gn-stamp/chip-gn-build /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/args.gn /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/build.ninja /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/.ninja_deps /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/build.ninja.stamp /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/lib/libCHIP.a /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a
cd /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E echo "Starting Matter library build in /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip" && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/python3.9 /home/gzp/ncs/v2.6.1/modules/lib/matter/config/common/cmake/make_gn_args.py @args.tmp > args.gn.tmp && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E compare_files args.gn.tmp args.gn || /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E rename args.gn.tmp args.gn && /home/gzp/ncs/toolchains/2be090971e/opt/bin/gn --root=/home/gzp/ncs/v2.6.1/modules/lib/matter --root-target=/home/gzp/ncs/v2.6.1/modules/lib/matter/config/nrfconnect/chip-gn --dotfile=/home/gzp/ncs/v2.6.1/modules/lib/matter/config/nrfconnect/chip-gn/.gn --script-executable=/home/gzp/ncs/toolchains/2be090971e/usr/local/bin/python3.9 gen --check --fail-on-unused-args /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip && ninja && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E echo "Matter library build complete"
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake --build /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1

how to do to fix it

  • sorry for wrong define in  src/chip_project_config.h, it should be:

    #pragma once
    #define CONFIG_CHIP_DEVICE_PRODUCT_ID 13
    #define CONFIG_CHIP_DEVICE_VENDOR_ID 4987

    and after revising, the error still the same:

    In file included from ../../../../../../../modules/lib/matter/src/system/SystemConfig.h:55,
    from ../../../../../../../modules/lib/matter/src/ble/BleConfig.h:43,
    from ../../../../../../../modules/lib/matter/src/lib/core/CHIPConfig.h:42,
    from ../../../../../../../modules/lib/matter/src/lib/core/CHIPError.h:31,
    from ../../../../../../../modules/lib/matter/src/app/icd/ICDNotifier.h:20,
    from ../../../../../../../modules/lib/matter/src/app/server/CommissioningWindowManager.cpp:18:
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:17: error: "CONFIG_CHIP_DEVICE_PRODUCT_ID" redefined [-Werror]
    17 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID 13
    |
    In file included from <command-line>:
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:624: note: this is the location of the previous definition
    624 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID 32773
    |
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:18: error: "CONFIG_CHIP_DEVICE_VENDOR_ID" redefined [-Werror]
    18 | #define CONFIG_CHIP_DEVICE_VENDOR_ID 4987
    |
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:622: note: this is the location of the previous definition
    622 | #define CONFIG_CHIP_DEVICE_VENDOR_ID 65521
    |
    cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
    cc1plus: all warnings being treated as errors
    [22/348] c++ obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o
    FAILED: obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o
    ccache /home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ -MMD -MF obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o.d -Wconversion -mthumb -Os -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -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-unused -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -D_POSIX_C_SOURCE=200809 -DMBEDTLS_CONFIG_FILE=\<nrf-config.h\> -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\<nrf-psa-crypto-want-config.h\> -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\<nrf-psa-crypto-config.h\> -fmacro-prefix-map=../../../../../../../modules/lib/matter/= -std=gnu++17 -fno-rtti -Wnon-virtual-dtor -isystem/home/gzp/ncs/v2.6.1/nrf/drivers/mpsl/clock_control -isystem/home/gzp/ncs/v2.6.1/zephyr/include -isystem/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -isystem/home/gzp/ncs/v2.6.1/zephyr/lib/libc/newlib/include -isystem/home/gzp/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -isystem/home/gzp/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -isystem/home/gzp/ncs/v2.6.1/zephyr/subsys/bluetooth -isystem/home/gzp/ncs/v2.6.1/zephyr/subsys/settings/include -isystem/home/gzp/ncs/v2.6.1/nrf/include -isystem/home/gzp/ncs/v2.6.1/nrf/lib/multithreading_lock/. -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/bluetooth/controller/. -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/trusted_storage/include -isystem/home/gzp/ncs/v2.6.1/zephyr/drivers/flash -isystem/home/gzp/ncs/v2.6.1/nrf/tests/include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/openthread/platform/. -isystem/home/gzp/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/cmsis/. -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -isystem/home/gzp/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -isystem/home/gzp/ncs/v2.6.1/modules/lib/zcbor/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nfc/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/common/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/simple_gpio/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/fem/include/protocol -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/mpsl/include/protocol -isystem/home/gzp/ncs/v2.6.1/nrfxlib/openthread/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include -isystem/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/nrf/subsys/nrf_security/src/include/generated -isystem/home/gzp/ncs/v2.6.1/nrf/subsys/nrf_security/include -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/core/include -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/core/library -isystem/home/gzp/ncs/v2.6.1/modules/crypto/mbedtls/include -isystem/home/gzp/ncs/v2.6.1/modules/crypto/mbedtls/library -isystem/home/gzp/ncs/v2.6.1/nrfxlib/crypto/nrf_oberon/include/ -isystem/home/gzp/ncs/v2.6.1/nrf/ext/oberon/psa/drivers -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/driver/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/sl/include -isystem/home/gzp/ncs/v2.6.1/nrfxlib/nrf_802154/common/include -isystem/home/gzp/ncs/v2.6.1/zephyr/modules/hal_nordic/nrf_802154/include -DKERNEL -D__ZEPHYR__=1 -D_FORTIFY_SOURCE=1 -D_ANSI_SOURCE -D__LINUX_ERRNO_EXTENSIONS__ -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -DNRF52840_XXAA -DZCBOR_ASSERTS -fno-strict-aliasing -fcheck-new -std=c++17 -fno-exceptions -fno-rtti -imacros/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=/home/gzp/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros/home/gzp/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -fno-pic -fno-pie --param=min-pagesize=0 -fmacro-prefix-map=/home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/gzp/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/gzp/ncs/v2.6.1=WEST_TOPDIR -specs=nano.specs -D_POSIX_THREADS -std=gnu++17 -DNDEBUG -DCHIP_HAVE_CONFIG_H=1 -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\> -I../../../../../../../modules/lib/matter/src/include -I../../../../../../../modules/lib/matter/src -Igen/include -I../../../../../../../modules/lib/matter/zzz_generated/app-common -I../../../../../../../modules/lib/matter/third_party/nlassert/repo/include -I../../../../../../../modules/lib/matter/third_party/nlio/repo/include -c ../../../../../../../modules/lib/matter/src/app/InteractionModelEngine.cpp -o obj/src/app/libCHIPDataModel.InteractionModelEngine.cpp.o
    In file included from ../../../../../../../modules/lib/matter/src/system/SystemConfig.h:55,
    from ../../../../../../../modules/lib/matter/src/ble/BleConfig.h:43,
    from ../../../../../../../modules/lib/matter/src/lib/core/CHIPConfig.h:42,
    from ../../../../../../../modules/lib/matter/src/lib/core/DataModelTypes.h:22,
    from ../../../../../../../modules/lib/matter/src/access/RequestPath.h:21,
    from ../../../../../../../modules/lib/matter/src/access/AccessControl.h:22,
    from ../../../../../../../modules/lib/matter/src/app/InteractionModelEngine.h:28,
    from ../../../../../../../modules/lib/matter/src/app/InteractionModelEngine.cpp:26:
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:17: error: "CONFIG_CHIP_DEVICE_PRODUCT_ID" redefined [-Werror]
    17 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID 13
    |
    In file included from <command-line>:
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:624: note: this is the location of the previous definition
    624 | #define CONFIG_CHIP_DEVICE_PRODUCT_ID 32773
    |
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/src/chip_project_config.h:18: error: "CONFIG_CHIP_DEVICE_VENDOR_ID" redefined [-Werror]
    18 | #define CONFIG_CHIP_DEVICE_VENDOR_ID 4987
    |
    /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/zephyr/include/generated/autoconf.h:622: note: this is the location of the previous definition
    622 | #define CONFIG_CHIP_DEVICE_VENDOR_ID 65521
    |
    cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
    cc1plus: all warnings being treated as errors
    ninja: build stopped: subcommand failed.
    FAILED: modules/connectedhomeip/src/chip-gn-stamp/chip-gn-build modules/connectedhomeip/args.gn modules/connectedhomeip/build.ninja modules/connectedhomeip/.ninja_deps modules/connectedhomeip/build.ninja.stamp modules/connectedhomeip/lib/libCHIP.a modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/src/chip-gn-stamp/chip-gn-build /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/args.gn /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/build.ninja /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/.ninja_deps /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/build.ninja.stamp /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/lib/libCHIP.a /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip/lib/libMatterDeviceInfoProviderExample.a
    cd /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E echo "Starting Matter library build in /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip" && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/python3.9 /home/gzp/ncs/v2.6.1/modules/lib/matter/config/common/cmake/make_gn_args.py @args.tmp > args.gn.tmp && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E compare_files args.gn.tmp args.gn || /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E rename args.gn.tmp args.gn && /home/gzp/ncs/toolchains/2be090971e/opt/bin/gn --root=/home/gzp/ncs/v2.6.1/modules/lib/matter --root-target=/home/gzp/ncs/v2.6.1/modules/lib/matter/config/nrfconnect/chip-gn --dotfile=/home/gzp/ncs/v2.6.1/modules/lib/matter/config/nrfconnect/chip-gn/.gn --script-executable=/home/gzp/ncs/toolchains/2be090971e/usr/local/bin/python3.9 gen --check --fail-on-unused-args /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1/modules/connectedhomeip && ninja && /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake -E echo "Matter library build complete"
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /home/gzp/ncs/toolchains/2be090971e/usr/local/bin/cmake --build /home/gzp/ncs/v2.6.1/nrf/samples/matter/light_bulb/build_1

  • Hi, 

    I see you are using other toolchain (2be090971e) to build NCS v2.6.1 and refer to the v2.0.2 doc, which is unsuitable for v2.6.1. 

    Please use the corresponding toolchain to build NCS v2.6.1. 

    May I know how you got the value for CONFIG_CHIP_DEVICE_VENDOR_ID? It needs the device manufacturer identifier that the Connectivity Standards Alliance assigns. 

    See Matter device identification doc.

    Regards,
    Amanda H. 

  • Hi hsieh,

    I am using the toolchain v2.6.1, you can see in the following Fig

    the CONFIG_CHIP_DEVICE_VENDOR_ID 4897 is SONOFF, I am using it for testing.

  • Is the ID assigned by the Connectivity Standards Alliance?

    I cannot find SONOFF in this page https://csa-iot.org/members/ 

    Sorry, I delete your last comment by accident. 

Related