Skip to content

Pre-built rust-analyzer no longer runs on RHEL8 compatible distros #13103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
harmic opened this issue Aug 24, 2022 · 2 comments
Closed

Pre-built rust-analyzer no longer runs on RHEL8 compatible distros #13103

harmic opened this issue Aug 24, 2022 · 2 comments

Comments

@harmic
Copy link

harmic commented Aug 24, 2022

rust-analyzer version: 0.3.1178

rustc version: rustc 1.62.0 (a8314ef7d 2022-06-27)

I am using RA via VS Code.

After updating to 0.3.1178, rust-analyzer refuses to start. When running manually in the shell, I get this:

$ /home/harmic/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1178-linux-x64/server/rust-analyzer --version
/home/harmic/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1178-linux-x64/server/rust-analyzer: /lib64/libc.so.6: version `GLIBC_2.29' not found (required by /home/harmic/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1178-linux-x64/server/rust-analyzer)

I downgraded to the previous version (0.3.1170) and it works.

RHEL8 is still the most current RHEL release, so it would seem premature to be building RA against GLIBC versions that are not available on RHEL8.

@igxactly
Copy link

igxactly commented Nov 11, 2022

I'm facing same problem on CentOS/RHEL7. glibc 2.18 is required but there is only 2.17 available.

rust-analyzer from rustup seems to work on RHEL7. Setting rust-analyzer.server.path to that binary (path from rustup which rust-analyzer command -- with rustup component add rust-analyzer done) works.

  • VSCode v1.73.1
    • rust-analzer plugin v0.3.1277 --> binary in this plugin does not run
  • Rust 1.65 with rust-analyzer plugin installed
    • rust-analyzer v1.65.0 (897e375 2022-11-02) --> this version of binary runs well

Note: CentOS 7 EOL is 2024

image

@lnicola
Copy link
Member

lnicola commented Nov 11, 2022

@harmic since #13214 the bundled binaries are built against GLIBC 2.27 (Ubuntu 18.04) (), which is older than GLIBC 2.28 in CentOS 8. Closing this issue.

@igxactly I see you found rust-analyzer.server.path. That works and it's how you're supposed to set it up, although you might have problems in the future with custom commands, since the stable toolchain component is quite a bit older than the Code extensions. Using the nightly toolchain (only) for RA will give you a newer version that's only a couple of days old usually. There's also the alternative of building from source.

We could also consider building on CentOS 7 (see the linked PR) if it's a simple change and enough people want it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants