Hi there,
I am currently following this following tutorial on building a Matter setup.
When trying to build the openthread coprocessor I am hit with the following error:
(Please refer to line 128 of the code block for when the error occurs).
gideon@ubuntu:~/ncs/nrf/samples/openthread/coprocessor$ west build -b nrf52840dongle_nrf52840 -- -DOVERLAY_CONFIG="overlay-usb.conf"
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /home/gideon/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/gideon/ncs/nrf/samples/openthread/coprocessor
-- Zephyr version: 2.7.99 (/home/gideon/ncs/zephyr), build: v2.7.99-ncs1-17-gc3208e7ff49d
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dongle_nrf52840
-- Cache files will be written to: /home/gideon/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/home/gideon/gnuarmemb)
-- Found BOARD.dts: /home/gideon/ncs/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
-- Generated zephyr.dts: /home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/dts.cmake
Parsing /home/gideon/ncs/nrf/samples/openthread/coprocessor/Kconfig
Loaded configuration '/home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/.config'
No change to configuration in '/home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/.config'
No change to Kconfig header in '/home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/autoconf.h'
/home/gideon/gnuarmemb/bin/arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
-- OpenThread Source Directory: /home/gideon/ncs/modules/lib/openthread
-- Package Name: OPENTHREAD
-- Setting default package version: thread-reference-20200818-ncs1-rc3-560-g02e61a2ed
-- Package Version: thread-reference-20200818-ncs1-rc3-560-g02e61a2ed
CMake Warning at /home/gideon/ncs/zephyr/CMakeLists.txt:764 (message):
No SOURCES given to Zephyr library: subsys__net__pkt_filter
Excluding target from build.
CMake Warning at /home/gideon/ncs/zephyr/CMakeLists.txt:1687 (message):
__ASSERT() statements are globally ENABLED
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gideon/ncs/nrf/samples/openthread/coprocessor/build
-- west build: building application
[132/388] cd /home/gideon/ncs/nrf/samples/openthread/coprocessor/build/modules/openthread/...FILE="nrf-config-user.h"" -P /home/gideon/ncs/modules/lib/openthread/etc/cmake/print.cmake
OPENTHREAD_CONFIG_ASSERT_ENABLE=1
OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1
OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
OPENTHREAD_CONFIG_COAP_API_ENABLE=1
OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0
OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
OPENTHREAD_CONFIG_DIAG_ENABLE=1
OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
OPENTHREAD_CONFIG_ECDSA_ENABLE=1
OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
OPENTHREAD_CONFIG_JOINER_ENABLE=1
OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
PACKAGE_NAME=OPENTHREAD
OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1
OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
KERNEL
__ZEPHYR__=1
_FORTIFY_SOURCE=2
BUILD_VERSION=v2.7.99-ncs1-17-gc3208e7ff49d
__LINUX_ERRNO_EXTENSIONS__
USE_PARTITION_MANAGER=0
__PROGRAM_START
NRF52840_XXAA
NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
NRF_802154_USE_RAW_API=1
NRF_802154_PENDING_SHORT_ADDRESSES=16
NRF_802154_PENDING_EXTENDED_ADDRESSES=16
NRF_802154_RX_BUFFERS=16
NRF_802154_CSMA_CA_ENABLED=1
NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
NRF_802154_ACK_TIMEOUT_ENABLED=1
NRF_802154_ENCRYPTION_ENABLED=0
NRF_802154_SECURITY_WRITER_ENABLED=0
NRF_802154_IE_WRITER_ENABLED=0
NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
NRF_802154_ECB_PRIORITY=-1
NRF_802154_SWI_PRIORITY=1
MBEDTLS_CONFIG_FILE=nrf-config.h
MBEDTLS_USER_CONFIG_FILE=nrf-config-user.h
[169/388] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/class/cdc_acm.c.obj
/home/gideon/ncs/zephyr/subsys/usb/class/cdc_acm.c:467:12: warning: 'cdc_acm_init' defined but not used [-Wunused-function]
467 | static int cdc_acm_init(const struct device *dev)
| ^~~~~~~~~~~~
/home/gideon/ncs/zephyr/subsys/usb/class/cdc_acm.c:422:13: warning: 'cdc_interface_config' defined but not used [-Wunused-function]
422 | static void cdc_interface_config(struct usb_desc_header *head,
| ^~~~~~~~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/subsys/usb/class/cdc_acm.c:402:13: warning: 'cdc_acm_dev_status_cb' defined but not used [-Wunused-function]
402 | static void cdc_acm_dev_status_cb(struct usb_cfg_data *cfg,
| ^~~~~~~~~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/subsys/usb/class/cdc_acm.c:305:13: warning: 'cdc_acm_int_in' defined but not used [-Wunused-function]
305 | static void cdc_acm_int_in(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status)
| ^~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/subsys/usb/class/cdc_acm.c:937:37: warning: 'cdc_acm_driver_api' defined but not used [-Wunused-const-variable=]
937 | static const struct uart_driver_api cdc_acm_driver_api = {
| ^~~~~~~~~~~~~~~~~~
[296/388] Building C object zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj
FAILED: zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj
ccache /home/gideon/gnuarmemb/bin/arm-none-eabi-gcc -DBUILD_VERSION=v2.7.99-ncs1-17-gc3208e7ff49d -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF52840_XXAA -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_CSMA_CA_ENABLED=1 -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=0 -DNRF_802154_IE_WRITER_ENABLED=0 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=0 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/gideon/ncs/nrf/drivers/mpsl/clock_control -I/home/gideon/ncs/zephyr/include -I/home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/include/generated -I/home/gideon/ncs/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/gideon/ncs/zephyr/lib/libc/newlib/include -I/home/gideon/ncs/zephyr/soc/arm/nordic_nrf/common/. -I/home/gideon/ncs/zephyr/subsys/net/lib/openthread/platform/. -I/home/gideon/ncs/zephyr/subsys/usb -I/home/gideon/ncs/zephyr/subsys/settings/include -I/home/gideon/ncs/nrf/include -I/home/gideon/ncs/nrf/lib/multithreading_lock/. -I/home/gideon/ncs/zephyr/drivers/flash -I/home/gideon/ncs/modules/hal/cmsis/CMSIS/Core/Include -I/home/gideon/ncs/modules/hal/nordic/nrfx -I/home/gideon/ncs/modules/hal/nordic/nrfx/drivers/include -I/home/gideon/ncs/modules/hal/nordic/nrfx/mdk -I/home/gideon/ncs/zephyr/modules/hal_nordic/nrfx/. -I/home/gideon/ncs/nrfxlib/mpsl/include -I/home/gideon/ncs/nrfxlib/mpsl/include/protocol -I/home/gideon/ncs/nrf/samples/openthread/coprocessor/build/modules/openthread/build/etc/cmake -I/home/gideon/ncs/modules/lib/openthread/etc/cmake -I/home/gideon/ncs/modules/lib/openthread/include -I/home/gideon/ncs/nrfxlib/nrf_802154/driver/include -I/home/gideon/ncs/nrfxlib/nrf_802154/sl/include -I/home/gideon/ncs/nrf/samples/openthread/coprocessor/build/modules/nrfxlib/nrfxlib/nrf_security/src/include/generated -I/home/gideon/ncs/nrfxlib/nrf_security/include -I/home/gideon/ncs/nrfxlib/nrf_security/include/mbedtls -I/home/gideon/ncs/nrfxlib/nrf_security/include/psa -I/home/gideon/ncs/mbedtls/include -I/home/gideon/ncs/mbedtls/include/mbedtls -I/home/gideon/ncs/mbedtls/include/psa -I/home/gideon/ncs/mbedtls/library -I/home/gideon/ncs/nrfxlib/nrf_security/../crypto/nrf_oberon/include -I/home/gideon/ncs/nrfxlib/nrf_security/../crypto/nrf_oberon/include/mbedtls -I/home/gideon/ncs/nrfxlib/nrf_security/../crypto/nrf_oberon/include/psa -I/home/gideon/ncs/nrfxlib/crypto/nrf_oberon/include/mbedtls -I/home/gideon/ncs/nrfxlib/crypto/nrf_oberon/include -isystem /home/gideon/ncs/zephyr/subsys/cpp/include -isystem /home/gideon/ncs/modules/lib/openthread/zephyr/../include -isystem /home/gideon/ncs/modules/lib/openthread/zephyr/../examples/platforms -isystem /home/gideon/ncs/nrfxlib/crypto/nrf_cc310_platform/include -Os -imacros /home/gideon/ncs/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -imacros /home/gideon/ncs/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/gideon/ncs/nrf/samples/openthread/coprocessor=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/gideon/ncs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/gideon/ncs=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj -MF zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj.d -o zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj -c /home/gideon/ncs/zephyr/subsys/net/lib/openthread/platform/uart.c
In file included from /home/gideon/ncs/zephyr/include/toolchain/gcc.h:72,
from /home/gideon/ncs/zephyr/include/toolchain.h:50,
from /home/gideon/ncs/zephyr/include/sys/atomic.h:12,
from /home/gideon/ncs/zephyr/include/logging/log_msg.h:9,
from /home/gideon/ncs/zephyr/include/logging/log_core.h:9,
from /home/gideon/ncs/zephyr/include/logging/log.h:11,
from /home/gideon/ncs/zephyr/subsys/net/lib/openthread/platform/uart.c:10:
/home/gideon/ncs/zephyr/subsys/net/lib/openthread/platform/uart.c: In function 'otPlatUartEnable':
/home/gideon/ncs/zephyr/include/device.h:96:39: error: '__device_dts_ord_DT_CHOSEN_zephyr_ot_uart_ORD' undeclared (first use in this function)
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~~~
/home/gideon/ncs/zephyr/include/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
/home/gideon/ncs/zephyr/include/device.h:96:31: note: in expansion of macro '_CONCAT'
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~
/home/gideon/ncs/zephyr/include/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/include/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/subsys/net/lib/openthread/platform/uart.c:160:16: note: in expansion of macro 'DEVICE_DT_GET'
160 | ot_uart.dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ot_uart));
| ^~~~~~~~~~~~~
/home/gideon/ncs/zephyr/include/device.h:96:39: note: each undeclared identifier is reported only once for each function it appears in
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~~~
/home/gideon/ncs/zephyr/include/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
/home/gideon/ncs/zephyr/include/device.h:96:31: note: in expansion of macro '_CONCAT'
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
| ^~~~~~~
/home/gideon/ncs/zephyr/include/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
| ^~~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/include/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/home/gideon/ncs/zephyr/subsys/net/lib/openthread/platform/uart.c:160:16: note: in expansion of macro 'DEVICE_DT_GET'
160 | ot_uart.dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ot_uart));
| ^~~~~~~~~~~~~
[301/388] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/gideon/ncs/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/gideon/ncs/nrf/samples/openthread/coprocessor/build
gideon@ubuntu:~/ncs/nrf/samples/openthread/coprocessor$
Please let me know if any further info is required from my end, thanks in advance!