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
相关推荐
满怀冰雪12 分钟前
21-图像分类实战:从 MNIST 到 CIFAR-10
人工智能·python·深度学习·分类·数据挖掘·paddlepaddle
129Lab2 小时前
数据驱动电池SOH预测实战:用AI工具快速构建深度学习模型并调参
pytorch·深度学习·ai编程·数据驱动·特征工程·电池管理系统·电池健康状态
软糯小野猫2 小时前
使用Pytorch从零开始构建StyleGAN
pytorch·深度学习·gan·图像生成·stylegan
金融小师妹3 小时前
多因子智能推演:7月零售销售下降,美元与黄金如何响应的AI传导框架
大数据·深度学习·逻辑回归
珐恩AI-人工智能3 小时前
大模型隐性权重衰减机制剖析:详解GEO长效维稳如何避免优质
大数据·人工智能·深度学习·机器学习·geo优化
蛋先生DX16 小时前
你瘦不下来但大模型可以:量化原理了解一下
深度学习·算法·llm
这张生成的图像能检测吗17 小时前
(论文速读)TADNet:心磁图信号去噪的时间分解和基于注意力的深度学习
人工智能·深度学习·信号处理·信号去噪
hhzz19 小时前
《深度学习框架PyTorch入门与实践》系列:11-实战猫狗大战之可复用的PyTorch项目架构
人工智能·pytorch·深度学习
XLYcmy19 小时前
小红书 算法一面 四
深度学习·llm·sft·强化学习·多模态·grpo·奖励函数
笨鸟先飞,勤能补拙20 小时前
AI与深度学习:从原理到应用
人工智能·windows·vscode·深度学习·机器学习·网络安全·github