You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Buildroot添加srsRAN_4G包时Boost缺失program_options组件求助

解决Buildroot中srsRAN_4G编译时Boost program_options缺失问题

我正尝试在Buildroot中添加基于CMake的srsRAN_4G包,使用generic_package模块配置,已声明boost、fftw-single、mbedtls等依赖,配置代码如下:

SRSRAN_VERSION = release_23_11
SRSRAN_SITE = https://github.com/srsran/srsRAN_4G.git
SRSRAN_SITE_METHOD = git
SRSRAN_LICENSE = AGPL-3.0
SRSRAN_LICENSE_FILES = LICENSE
SRSRAN_DEPENDENCIES = boost fftw-single mbedtls lksctp-tools host-cmake

ifeq ($(BR2_PACKAGE_ZEROMQ),y)
SRSRAN_DEPENDENCIES += zeromq
SRSRAN_DEPENDENCIES += czmq
endif

define SRSRAN_CONFIGURE_CMDS
    (mkdir -p $(@D)/build && \
    cd $(@D)/build && \
    $(TARGET_CONFIGURE_OPTS) \
    $(TARGET_CONFIGURE_ARGS) \
    cmake ../ \
    $(SRSRAN_CONF_OPTS) \
    )
endef


$(eval $(generic-package))

编译时出现如下错误:

-- Could NOT find Boost (missing: program_options) (found suitable version "1.80.0", minimum required is "1.35")
CMake Error at CMakeLists.txt:296 (message):
  Boost required to build srsRAN

解决方案:

  • 默认Buildroot的boost包仅启用部分核心组件,需显式开启program_options组件:

    1. 进入Buildroot配置界面:make menuconfig
    2. 导航到Target packages -> Libraries -> Misc -> boost
    3. 勾选program_options选项,保存配置后重新编译。
  • 若直接修改.config文件,添加或确保以下配置项存在:

    BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
    
  • 也可在srsRAN_4G的package配置文件中,通过依赖声明强制启用该组件,修改SRSRAN_DEPENDENCIES:

    SRSRAN_DEPENDENCIES = boost-program_options fftw-single mbedtls lksctp-tools host-cmake
    

    使用boost-program_options替代boost,Buildroot会自动处理依赖,确保该组件被编译安装。

内容的提问来源于stack exchange,提问作者Shirin Ebadi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.25 03:12:39