编译tikv5.4.1版本时,cargo build报错

【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】
error: failed to get crossbeam-skiplist as a dependency of package concurrency_manager v0.0.1 (/root/go/src/github.com/tikv/test/tikv-5.4.1/components/concurrency_manager)

Caused by:
failed to load source for dependency crossbeam-skiplist

Caused by:
Unable to update https://github.com/tikv/crossbeam.git?branch=tikv-5.0#e0e083d0

Caused by:
failed to clone into: /root/.cargo/git/db/crossbeam-b3e66c33e6ecb946

Caused by:
network failure seems to have happened
if a proxy or similar is necessary net.git-fetch-with-cli may help here
Configuration - The Cargo Book

Caused by:
SSL error: unknown error; class=Ssl (16)

缺少依赖包concurrency_manager v0.0.1,同时检查一下网络

能访问 github吗?感觉是网络不通

可以访问的,网络也是通的,我多次cargo build,都是在这个地方报错,源码里面也有concurrency_manager
(base) root@node1:~/go/src/github.com/tikv/test/tikv-5.4.1/components/concurrency_manager# ls
benches Cargo.toml src tests

参考这个看看。

你是自己修改代码了? 官方有提供软件包

需要源码编译,没有改代码,直接从github下载的源码

就是tikv改了一个库:crossbeam 没有改版本号,也没同步到creat-io里面,导致下载的不对吧。按我上面帖子中的最佳答案改个版本号就行了。

1 个赞

还没有使用Source Code安装过。

看懂了,版本要错开
vim components/tidb_query_datatype/Cargo.toml ,注释encoding_rs
修改为:encoding_rs = { git = “https://github.com/tikv/encoding_rs.git”, rev=“5870de8f67a354daeb3649794e960c60339011f4” }

vim components/concurrency_manager/Cargo.toml ,注释crossbeam-skiplist
在下一行添加,修改为:crossbeam-skiplist = “0.1”

嗯,但是为什么不编译最新版本呢?5.4有点老了。

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。