1

默认情况下,在 Buildroot 中交叉编译时包不会BR2_PACKAGE_BOOST_MPI构建:它需要检测 MPI(例如 OpenMPI)配置和库,并且鉴于这不可能自动(在 buildroot 环境中),构建系统只会通知 Boost.MPI 获取跳过:bjam

warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.

在我的环境中,我可以通过修补来解决这个问题output/build/boost-1.61.0/user-config.jam

using gcc : 6.2.0 : 
     /home/me/buildroot-2016.11/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ : 
     <cxxflags>"-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os " <linkflags>"" ;

using mpi : /home/me/buildroot-2016.11/output/host/usr/bin/arm-buildroot-linux-gnueabihf/g++ : 
<find-shared-library>mpi  <find-shared-library>dl ;

(第一行是user-config.jam构建系统配置的唯一内容;我添加了第二行。此外,此处调整了路径)。

注意:我通过查看mpi.jam源和大量尝试错误获得了 bjam 行。

但是,任何干净的重建都会删除output/build目录,从而擦除这些更改。

在使用 Buildroot 进行交叉编译时,是否有一种“正确”的方式来启用 Boost.MPI 的编译?或者至少,能够user-config.jam在构建系统配置编译器后修补文件?(请注意,路径取决于我的系统配置和目标主机)。

4

0 回答 0