MisakaMKT

(SA002)在运行`cmake .`时发生的错误: "Operation timed out after 30000 milliseconds ..."

(SA002)在运行cmake .时发生的错误: "Operation timed out after 30000 milliseconds ..."

在使用cmake .编译vsag时出现错误:

[1448 bytes data]

[1448 bytes data]

[1448 bytes data]

Operation timed out after 30000 milliseconds with 37498381 out of 100717067
bytes received

Closing connection 0

      --- LOG END ---

gmake[2]: *** [CMakeFiles/roaringbitmap-populate.dir/build.make/roaringbitmap-populate-prefix/src/roaringbitmap-populate-stamp/roaringbitmap-populate-download] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/roaringbitmap-populate.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1622 (message):
Build step for roaringbitmap failed: 2
Call Stack (most recent call first):
/usr/share/cmake/Modules/FetchContent.cmake:1762:EVAL:2 (__FetchContent_directPopulate)
/usr/share/cmake/Modules/FetchContent.cmake:1762 (cmake_language)
_deps/vsag-src/extern/roaringbitmap/roaringbitmap.cmake:28 (FetchContent_Populate)
_deps/vsag-src/CMakeLists.txt:183 (include)

大致意思是下载操作超时了,将这一段扔给ai会给你说将超时阈值(错误信息中的30000 milliseconds ,下文提到的timeout)调高即可。

但是需要注意的是timeout不仅可以在主cmake文件中可以指定,也可以在下载单个模块时指定,这样我们在主cmake文件中设置的timeout就被覆盖了。如代码所示:

FetchContent_Declare(
  vsag
  URL http://vsagcache.oss-rg-china-mainland.aliyuncs.com/vsag/v0.11.6.tar.gz
  URL_HASH MD5=e79a42205e67afda73d6515e07d83f68
                DOWNLOAD_NO_PROGRESS 0
                INACTIVITY_TIMEOUT 5
                TIMEOUT 30
)

(跳转到提到的_deps/vsag-src/extern/roaringbitmap/roaringbitmap.cmake:28就可以找到了、这段代码了)

因此将TIMOUT 30 改为TIMEOUT 300(300秒)即可。

posted on   MisakaMKT  阅读(28)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)

导航

统计信息

点击右上角即可分享
微信分享提示