我如何告诉 buildroot 在主机工具链中包含 boost

How do I tell buildroot to include boost in the host toolchain

我正在替换旧的交叉编译工具链,但我不知道如何让 buildroot 像旧工具链那样包含 host/.../sysroot/usr/include/boost

上下文:

我正在尝试构建一个 docker 映像,可用于为 MiyooCFW in GitHub Actions. Here is my current Dockerfile 交叉编译软件。

该项目从 uClibc 转移到 musl libc,这就是需要更新工具链的原因。

实际工作的旧工具链是 .zip file on google drive. I think it was probably built using Makefile.legacy in this buildroot fork. The newer one uses make sdk with the main Makefile there. (There is a bit of documentation,但它不完整。)

我安装了 libboost-all-dev,它将库放在 /usr/include/boost/ 中,但仅仅安装它们显然是不够的。

GMenuNX is an example program I'm trying to cross-compile that depends on boost. The steward branch uses a docker image with the older toolchain and compiles successfully. The ci branch uses my new docker image and fails 与:

/opt/miyoo/bin/arm-linux-g++ -ggdb -DTARGET_MIYOO -DTARGET=miyoo -D__BUILDTIME__="\"2022-02-19 18:33\"" -DLOG_LEVEL=3 -I/opt/miyoo/arm-buildroot-linux-musleabi/sysroot/usr/bin/../../usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/opt/miyoo/usr/include/ -I/opt/miyoo/arm-buildroot-linux-musleabi/sysroot/usr/include/  -I/opt/miyoo/arm-buildroot-linux-musleabi/sysroot/usr/include/SDL/ -o objs/miyoo/src/selector.o -c src/selector.cpp
src/selector.cpp:34:10: fatal error: boost/algorithm/string.hpp: No such file or directory
  34 | #include <boost/algorithm/string.hpp>
     |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile.miyoo:31: objs/miyoo/src/selector.o] Error 1
Error: Process completed with exit code 2.

我也尝试过手动复制 boost 库,但这让我得到了 bunch of different errors

最后,如果不是很明显的话,我在 buildroot、交叉编译等方面完全是个菜鸟。我什至不经常使用 c++。我很可能错过了一些明显的东西。

如果您希望 Buildroot 工具链包含 Boost 库,请在您的 Buildroot 配置中启用 Boost 包:BR2_PACKAGE_BOOST=y。它有很多 sub-options,请确保启用与您相关的那些。

在您的机器上安装 Boost 对工具链 sysroot 中可用的库的影响绝对为零。