[Share Experiences] GLIBC 版本导致的 RustRover 无法正常索引的问题及解决
Tofloor
poster avatar
panic!E0597
deepin
2023-11-03 06:53
Author

最近在将项目从 CLion with Rust Plugin 迁移到 RustRover 时,发现之前正常工作的项目无法在RR正确索引,没有类型推导以及代码亮等功能。

具体问题及解决过程见: RustRover isn't able to index correctly

确实没想到GLIBC能这样影响编译器,还是没有明显提示的那种。

通过 ldd --version ,发现deepin 20.9 使用的 GLIBC 版本还是 2.28,而RustRover所需GLIBC版本是 2.29 及以上,而且现用的软件源最高就是 2.28,因此即使 apt 更到最新也没用。

最后,自己编译一份 GLIBC 即可,或是在本地编译一遍问题组件,并替换原组件。

Reply Favorite View the author
All Replies
青稚
Moderator
2023-11-03 16:06
#1

我记得,我以前出过一个GLIBC版本过低,自行编译的教程。

Reply View the author
我是昵称
deepin
2023-11-03 17:05
#2
v23 beta版本版本可以满足。
Reply View the author
Shiroko
deepin
2023-11-03 18:03
#3

本地编译的glibc仍然需要通过容器加载ldd、ld.so之类的动态链接程序。

这个不知道有什么好方法解决。

Reply View the author
black_white_bear
deepin
2023-11-03 18:04
#4
青稚

我记得,我以前出过一个GLIBC版本过低,自行编译的教程。

系统上能同时安装多个version of GLIBC吗?看windows上C++/NET都可以好几个版本的

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-03 18:45
#5

https://deepin-community-store.gitee.io/spk-resolv/?spk=spk://store/tools/additional-base-lib

Reply View the author
北冥夜未央
deepin
Ecological co-builder
2023-11-03 21:28
#6
black_white_bear

系统上能同时安装多个version of GLIBC吗?看windows上C++/NET都可以好几个版本的

系统级的只能有一个,软件用的随便,需要自己规定好so文件的加载路径。

Reply View the author
lqs_is_a_goodboy
deepin
2023-11-22 19:31
#7
青稚

我记得,我以前出过一个GLIBC版本过低,自行编译的教程。

大佬能不能给个链接,我也遇到了想用的软件依赖glibc版本较高的问题,想学着自己编译一个高版本的glibcapplaud

Reply View the author
青稚
Moderator
2023-11-22 20:50
#8
lqs_is_a_goodboy

大佬能不能给个链接,我也遇到了想用的软件依赖glibc版本较高的问题,想学着自己编译一个高版本的glibcapplaud

https://bbs.deepin.org/phone/zh/post/254141

不建议自己操作,这个风险比较大,整不好容易出问题。

Reply View the author
masaike
deepin
2023-12-27 20:33
#9

按照楼主的指引,从github上拉取 intellij-rust-master的源码,然后自行编译其中的 native-helper模块,再用本地编译的 intellij-rust-native-helper 替换 RustRover下面的同名文件就好了!

感谢楼主!楼主英明!👍

因为 Glibc版本问题,害我在 Windows上开发调试好,再切到 Deepin上同步代码测试,麻烦了一个多月,我已经准备放弃 Deepin 了,昨晚在虚拟机上装上其他国产贴牌Linux,开发环境也都配好了,今早恢复完 Deepin系统,不死心再上论坛看看,居然找到解决办法😄 。

下面列出简要操作:

$ unzip intellij-rust-master.zip
$ cd intellij-rust-master/native-helper
$ cargo b --release
$ cp target/release/intellij-rust-native-helper ~/.local/share/RustRover/plugins/intellij-rust/bin/linux/x86-64/intellij-rust-native-helper

注意事项:

  1. 下载 RustRover的源码包,和编译 native-helper模块的过程,都需要访问 github
  2. 替换文件的路径根据 RustRover的安装路径进行调整,我是把 RustRover安装在 ~/.local/share/RustRover目录下的。
  3. 替换文件前先备份原文件。
Reply View the author