(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 receivedClosing 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 2CMake 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秒)即可。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)