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

Ubuntu 22.04.4 WSL编译Proxygen遇liburing链接错误求助

编译Proxygen时出现undefined reference to folly::AsyncIoUringSocket链接错误

环境信息

  • Windows 10 WSL2,Ubuntu 22.04.4 LTS
  • GCC 11.4.0
  • 按照Proxygen官方仓库说明,执行./build.sh编译

问题过程

  1. 最初编译时遇到liburing函数不存在的编译器错误,卸载重装liburing-dev包后解决
  2. 现在出现大量链接错误,核心为undefined reference to folly::AsyncIoUringSocket,与liburing库相关
  3. 编译过程中存在警告:The package name passed to find_package_handle_standard_args (LIBURING) does not match the name of the calling package (LibUring),其他依赖的同类警告未影响编译
  4. 尝试过vcpkg、linuxbrew安装Proxygen,均出现编译错误
  5. 背景:仅熟悉Windows/Visual Studio,对CMake和Linux环境完全陌生

解决方案建议

1. 锁定兼容的liburing版本

Proxygen仅在Ubuntu 18.04测试过,该系统默认liburing版本较低,而Ubuntu 22.04的liburing版本可能过高导致API不兼容:

  • 尝试安装指定版本的liburing-dev:
    sudo apt remove liburing-dev
    sudo apt install liburing-dev=1.0.7-3ubuntu2
    
  • 若找不到对应版本,可手动从源码编译旧版liburing:
    git clone https://github.com/axboe/liburing.git
    cd liburing
    git checkout tags/liburing-1.0.7
    ./configure
    make
    sudo make install
    

2. 禁用liburing支持编译Proxygen

如果不需要IO_uring功能,可修改编译逻辑关闭该选项:

  • 编辑Proxygen目录下的build.sh,在CMake配置段添加-DFOLLY_USE_LIBURING=OFF参数
  • 或直接执行编译命令:
    cmake .. -DFOLLY_USE_LIBURING=OFF
    make -j$(nproc)
    

3. 降级系统到Ubuntu 18.04(终极兼容方案)

由于Proxygen仅在Ubuntu 18.04做过完整测试,可在WSL中创建该版本实例:

  • Windows终端执行:wsl --install -d Ubuntu-18.04
  • 进入实例后按官方文档安装依赖并执行./build.sh

关于CMake警告的说明

find_package_handle_standard_args的名称不匹配警告属于CMake配置的非致命问题,不会导致编译失败,可忽略,当前核心问题为liburing版本不兼容导致的链接错误。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.25 05:10:54