CMake Error at fc_base/gflags-src/CMakeLists.txt:73

完整日志:

shell 复制代码
CMake Warning (dev) at /root/miniconda3/share/cmake-4.1/Modules/FetchContent.cmake:1373 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/gflags.cmake:1 (FetchContent_Declare)
  cmake/openfst.cmake:2 (include)
  CMakeLists.txt:44 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Populating gflags
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /root/autodl-tmp/wenet/runtime/libtorch/fc_base/gflags-subbuild
[100%] Built target gflags-populate
CMake Error at fc_base/gflags-src/CMakeLists.txt:73 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

在构建 wenet runtime 时报错,如上。

构建命令为:

shell 复制代码
mkdir build && cd build && cmake .. && cmake --build .

构建命令指定版本即可解决:

shell 复制代码
cmake -version
# cmake version 4.1.2
shell 复制代码
mkdir build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=4.1.2 .. && cmake --build .

需要将原本的 build 目录删了

shell 复制代码
...
[ 91%] Linking CXX executable label_checker_main
[ 91%] Built target label_checker_main
[ 93%] Building CXX object bin/CMakeFiles/api_main.dir/api_main.cc.o
[ 94%] Linking CXX executable api_main
[ 94%] Built target api_main
[ 95%] Building CXX object bin/CMakeFiles/websocket_client_main.dir/websocket_client_main.cc.o
[ 97%] Linking CXX executable websocket_client_main
[ 97%] Built target websocket_client_main
[ 98%] Building CXX object bin/CMakeFiles/websocket_server_main.dir/websocket_server_main.cc.o
[100%] Linking CXX executable websocket_server_main
[100%] Built target websocket_server_main
相关推荐
源码之屋7 小时前
计算机毕业设计:Python天气数据采集与可视化分析平台 Django框架 线性回归 数据分析 大数据 机器学习 大模型 气象数据(建议收藏)✅
人工智能·python·深度学习·算法·django·线性回归·课程设计
bryant_meng8 小时前
【Reading Notes】(8.11)Favorite Articles from 2025 November
人工智能·深度学习·业界资讯
Spliceㅤ8 小时前
Transformer
人工智能·深度学习·transformer
杀生丸学AI8 小时前
【4DGS】4C4D:4个摄像头4DGS成像
人工智能·深度学习·三维重建·3dgs·4dgs·动态重建·高斯溅射
盼小辉丶8 小时前
PyTorch实战(41)——Hugging Face在PyTorch中的应用
人工智能·pytorch·深度学习·hugging face
宝贝儿好8 小时前
【LLM】第一章:分词算法BPE、WordPiece、Unigram、分词工具jieba
人工智能·python·深度学习·神经网络·算法·语言模型·自然语言处理
青瓷程序设计8 小时前
基于深度学习的【猫类识别系统】~Python+深度学习+人工智能+算法模型+2026原创+计算机毕设
人工智能·python·深度学习
渡我白衣8 小时前
运筹帷幄——在线学习与实时预测系统
人工智能·深度学习·神经网络·学习·算法·机器学习·caffe
骇客野人8 小时前
本地模型 + RAGFlow 构建知识库实操过程
深度学习·transformer
jinanwuhuaguo17 小时前
截止到4月8日,OpenClaw 2026年4月更新深度解读剖析:从“能力回归”到“信任内建”的范式跃迁
android·开发语言·人工智能·深度学习·kotlin