0

问题:

我正在尝试在我的 Ubuntu 18.04 PC 中的 yocto 构建系统中构建 ot-br-posix。我已经解决了许多从开始时出现的错误,现在陷入与“Boost”文件夹相关的错误中。

描述:

我正在Yocto 环境中从GitHub构建 OpenThread 源代码。我们的定制板需要在 Yocto 环境中编译 OpenThread。因此,我为编译所需的所有信息创建了一个配方文件 (.bb)。OpenThread 的最新版本使用 CMake,对我来说有点新。我之前没有遇到过“Boost”。所以,“Boost”也是新的。所以我无法清楚地找出问题所在。

在 ot-br-posix (OpenThread) 的编译中出现以下错误:

| CMake Error at /home/pandurang/projects/git/CustomBoard/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/otbr/git-r0/recipe-sysroot-native/usr/share/cmake-3.14/Modules/FindBoost.cmake:2132 (message):
|   Unable to find the requested Boost libraries.
| 
|   Boost version: 1.65.1
| 
|   Boost include path: /usr/include
| 
|   Could not find the following static Boost libraries:
| 
|           boost_filesystem
|           boost_system
| 
|   No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
|   directory containing Boost libraries or BOOST_ROOT to the location of
|   Boost.
| Call Stack (most recent call first):
|   etc/cmake/options.cmake:78 (find_package)
|   CMakeLists.txt:37 (include)
| 
| 
| -- *** (OTBR_VERSION) *** Version: 0.3.0-b9565b4c-dirty

CMake 版本:3.14

我已经查看了其他人的解决方案几个小时,但找不到适合我的问题的正确答案。我从以下链接中应用了一些解决方案,但没有帮助。

当我搜索 Boost 文件夹时,它在 recipe-sysroot 路径中,但不在 recipe-sysroot-native 路径中,我认为它在 recipe-sysroot-native 路径中搜索。请参阅下面的 FIND 命令的输出:

pandurang@pandurang-desktop:~/projects/git/CustomBoard/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/otbr/git-r0$ find ./recipe-sysroot -name "boost"
./recipe-sysroot/sysroot-providers/boost
./recipe-sysroot/usr/include/boost
./recipe-sysroot/usr/include/boost/chrono/typeof/boost
./recipe-sysroot/usr/include/boost/hana/ext/boost

pandurang@pandurang-desktop:~/projects/git/CustomBoard/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/otbr/git-r0$ find ./recipe-sysroot-native/ -name "boost"
./recipe-sysroot-native/installeddeps/boost

pandurang@pandurang-desktop:~/projects/git/CustomBoard/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/otbr/git-r0$

编辑:我已更新 _otbr 脚本如下: otbr_install () "-DCMAKE_INSTALL_PREFIX=/usr" 更新为 "-DCMAKE_INSTALL_PREFIX=/home/pandurang/projects/git/Gateway/build/tmp/work/cortexa7t2hf-neon-poky- linux-gnueabi/otbr/git-r0/recipe-sysroot/usr”。

通过上述更改,与“Boost”文件夹相关的错误得到解决,现在出现了一个新错误:

| [1/342] 链接 CXX 可执行文件 third_party/openthread/repo/src/posix/ot-ctl | 失败:第三方/openthread/repo/src/posix/ot-ctl | : && /home/pandurang/projects/git/Gateway/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/otbr/git-r0/recipe-sysroot/usr/lib/libreadline.so -lncurses && : | /home/pandurang/projects/git/Gateway/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/otbr/git-r0/recipe-sysroot-native/usr/lib/libncurses.so.5:文件无法识别:文件格式无法识别 | collect2:错误:ld 返回 1 个退出状态

请帮我解决上述错误。

4

0 回答 0