Zephyr cmake 错误"字符串子命令 REGEX,模式匹配总共至少需要 5 个参数才能命令



嗨,我正在尝试运行入门指南,但我遇到了问题,我目前在 zephyr 目录上,我想运行该示例,所以我尝试west build -p auto -b qemu_x86 samples/basic/blinky但它给出了

-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /content/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /content/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.3.99 (/content/zephyrproject/zephyr)
-- Board: qemu_x86
-- Found toolchain: zephyr (/usr/zephyr-sdk-0.11.3)
-- Found west: /root/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
/usr/zephyr-sdk-0.11.3/sysroots/x86_64-pokysdk-linux/usr/bin/dtc: error while loading shared libraries: libunwind.so.8: cannot open shared object file: No such file or directory
CMake Error at /content/zephyrproject/zephyr/cmake/host-tools.cmake:63 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Call Stack (most recent call first):
/content/zephyrproject/zephyr/cmake/app/boilerplate.cmake:490 (include)
/content/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/content/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
CMakeLists.txt:4 (find_package)

CMake Error at /content/zephyrproject/zephyr/cmake/host-tools.cmake:68 (if):
if given arguments:
"VERSION_GREATER" "1.4.6"
Unknown arguments specified
Call Stack (most recent call first):
/content/zephyrproject/zephyr/cmake/app/boilerplate.cmake:490 (include)
/content/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/content/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -B/content/zephyrproject/zephyr/build -S/content/zephyrproject/zephyr/samples/basic/blinky -GNinja -DBOARD=qemu_x86

有一个谷歌colab试图重现这个问题。

该错误是由过时的 DTC 版本引起的。更新或使用 SDK 安装中的那个:

ln -s <zephyr-install-dir>/sysroots/x86_64-pokysdk-linux/usr/bin/dtc ~/.local/bin/dtc

并确保您的 .local/bin 在/usr/bin 之前$PATH

您可以通过以下方式检查版本:

dtc --version

它应大于 1.4.6。

Ubuntu 18.0.4 的版本为 1.4.5

相关内容

  • 没有找到相关文章

最新更新