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
相关推荐
海海不掉头发1 小时前
阶段五_实验34-38_学习总结
深度学习·神经网络·学习·机器学习
布吉岛的石头3 小时前
Java 程序员第 49 阶段5:BERT 预训练目标 MLM+NSP 的工程含义
java·人工智能·深度学习·bert·transformer
广州山泉婚姻4 小时前
Go微服务落地:服务通信、注册发现完整实现分享
人工智能·深度学习·微服务
kyrie_sakura4 小时前
大模型学习7 -- 深度学习2 -- 张量
python·深度学习
2601_962177307 小时前
小白安装Claude Code完整教程:Windows从零装好并接入Crazyrouter(附403解决方法)
人工智能·深度学习·目标检测·机器学习·数据挖掘
xx_xxxxx_7 小时前
论文阅读-CoTTA
人工智能·深度学习·机器学习
空奈qwq7 小时前
PyTorch 进阶指南:从张量操作到模型训练全流程
人工智能·pytorch·深度学习
田园诗人之园7 小时前
深度学习归一化 fully 指南:BN/LN/IN/GN/RMSNorm 公式推导 + PyTorch 实验全验证(附完整可运行代码)
深度学习·深度学习归一化
uncle_ll8 小时前
分类任务解决样本数据不均衡的落地实战指南
人工智能·深度学习·机器学习·分类·数据处理
一切皆是因缘际会8 小时前
掌控信息论:同源星际通信零延迟架构
人工智能·深度学习·ai·系统架构·信息与通信·星际通信·同源通信