-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"Bootstrap Error" rust-analyzer requires glibc >= 2.28 in latest build. #11558
Comments
Compiling from source works, wonder if something changed on the GH actions runner that made it require a newer glibc. 🤔 |
You can use the rust-analyzer from rustup if you need to run it on a system with an older glibc version. The change breaking 18.04 support was probably #10672 which updated the builder from ubuntu 18.04 to 20.04. |
It was actually working on 20.04 at the time (I checked and marked it as "potentially breaking" in the changelog, as opposed to "breaking"). Maybe we (or the compiler, in 1.59) recently started using some symbol from 2.28 or 2.29. |
This is somewhat problematic for us, because our remote development environment for our company is ubuntu 18.04 at current, which means the rust-analyzer extension will suddenly break in a weird way (the error message isn't that clear about lacking glibc, I had to actually go and execute the bundled r-a binary directly.) I wonder how many people will run into this issue when this change hits the main release. To ensure maximum compatibility with the rust-analyzer binary distributed in the vscode extension, should we instead bundle the musl binary? |
Musl's memory allocator is slower. It may also affect memory usage (positive or negative). |
In addition using musl would make it impossible to load proc macros compiled for glibc. (which is the default) |
Hmm, is there any viable path forward to restore 18.04 support? Ubuntu 18.04 is supported until April 2023, which means it will be in wide use until then (and probably for a while after...) |
Using the rust-analyzer-preview component from rustup is the easiest way. This one is built to support the exact same glibc versions as rustc. |
Is that one regularly updated with each week's r-a release? From a user-friendliness perspective, the vscode extension "just updates" and keeps up to date with the latest version, having to pull from rustup means no more auto updates :/ |
Yes, it get updated every week: https://github.com/rust-lang/rust/pulls?q=is%3Apr+%3Aup%3A+rust-analyzer+is%3Amerged+-label%3Arollup I agree that it is less user friendly. |
Would it be possible to just replicate what rustc is doing to compile rust-analyzer here? That way we can maintain same support as the rustup component? |
Rustc uses a docker image with an older linux distro to build everything. I believe @matklad is worried that it will harm maintenance to do so for rust-analyzer too due to complicating the CI. Currently the exact same steps are used for all platforms for which binaries are released. Using docker on linux would require duplicating this. |
We could try to roll back our CI to 18.04, but in general we don't have the same infrastructure as rust-lang/rust and we can't offer the same variety of builds. That's why it's available in |
How I can use RA from rustup? what should I do |
Bootstrap error [Error: Failed to execute /root/.vscode-server/extensions/matklad.rust-analyzer-0.2.956/server/rust-analyzer --version
|
$ rustup toolchain install nightly --component rust-analyzer-preview Then set |
This could be somewhat mitigated by using a custom allocator - e.g. either setting jemalloc or mimalloc via I definitely recommend to publish by default an extension which works with older glib versions - because far more distributions than just Ubuntu 18 haven't caught up and will run into issues. Whether that's best achieved using an older Ubuntu builder again or by moving to musl and bundling more dependencies is up to the team :) |
Summary of a workaround
Option 1 - downgrade1.Open the extension page in VS Code NotesYou will be perpetually stuck on that version. Option 2 - use pre-prelease via rustup
NotesYou will have to update the extension manually with
|
Workaround Option 1 is not working for me. When I try to downgrade to 0.2.948 I get the following error in VSCode: "Can't install 'matklad.rust-analyzer' extension because it is not compatible with the current version of Visual Studio Code (version 1.64.2)." |
Getting the same error as @dpypin for Option 1. When I try Option 2, I don't actually see any Edit: Worth noting that I have the latest version of vscode which is 1.64.2. I'm currently in the process of downgrading to see if I can get it working again. |
Is there any way to get one of the previous builds to work with VS Code 1.64.2? This has kinda derailed me in an environment where I can’t use rustup. |
@sejr you can download one from https://github.com/rust-analyzer/rust-analyzer/releases, |
so next monday (2022-03-14) with just reintalling the extension everything should work out of the box on 18.04. right? |
I just went to the second option of this thread and it seems to be working fine. |
Yeah, just keep in mind that it won't update automatically and the Code extension and server binary might become mismatched. |
Stable versions are 0.2.X, preview versions are 0.3.Y and source builds are 0.4.0. |
v0.3.963 not working in debian 9
|
The GLIBC version in Debian 9 is too old, you'll have to use |
For Option 2, note that when searching for rust-analyzer.server.path you need to be in the remote tab of settings. |
This issue seems to reappear in the most recent release:
This is on Debian 10.12 that has GLIBC 2.28:
|
glibc 2.28 not supported by latest versions anymore. |
why the vscode can not select the version ? downward compatibility is correct。 give up the rust instead of C++。terrible rule. |
Since two weeks ago the binaries are built again on Ubuntu 18.04. VS Code different know anything about GLIBC version requirements. |
If our company use Rust,there are issues: |
Not found "rust-analyzer.server.path" in v0.4.1387 rustup toolchain install nightly --component rust-analyzer-preview
mv /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rust-analyzer /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.4.1387-linux-x64/server/rust-analyzer |
Looks like the issue should be reopened, still having the exact same issue and the current instructions to edit our VSCode settings are no longer up to date with the extensions' configuration schema. |
@manmartgarc which distro are you on? I remember some Ubuntu version upgraded to a newer GLIBC a while ago. |
Using AL2 |
I suggest building from source for now. The config key is still |
It works for me in
|
|
rust-analyzer no longer will run on Ubuntu 18.04( which bundles glibc 2.27), and other distros which have a glibc older than 2.27.
this issue manifests as a "Bootstrap Error" notably, the extension output will log something along the lines of:
when running the binary, we get the following error:
current workarounds are mentioned in this comment: #11558 (comment)
The text was updated successfully, but these errors were encountered: