-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
2022-08-22 release updated GLIBC version dependency #13081
Comments
You can use |
Is there any documentation how to solve this? I am stuck to develop on Ubuntu 18.04 (which is still maintained) and need some guidance how to get it working.
|
You need to install a nightly (or beta?) toolchain and the Keep in mind that the nightlies are usually a couple of days behind the releases in this repository. This isn't a problem most of the time, but it's possible that some features like the custom commands won't function correctly. And of course, you can disable automatic updates and keep using an old version of RA, it should keep working in the future. |
Thank you. I think this mostly works. I got a few panics initially, but am currently not able to reproduce them. To be honest I would much prefer something like a musl built static rust-analyzer if cross-compilation for an old glibc is not possible. |
Do you mean this one? I recommend against using it because proc macros won't work there -- AFAIK, there's no |
dlopen is supported by dynamically linked musl, but not statically linked musl. However if you use a musl rust-analyzer, you also need to use a musl rustc and vice versa to make proc macros work. Proc macros are linked against the same libc as rustc so that rustc can dlopen them at runtime and rust-analyzer needs to use the same libc so that it too can dlopen them at runtime. |
Wouldn't that be solved by the proc-macro-srv rustup component we now have? Since that is build the same as rustc (when the rustup component is being used that is). |
proc-macro-srv is not yet on stable, right? Once it is, yes it would be fixed I think. |
I think we caught the beta train, so it should be there in the next release. But the MUSL build was slower IIRC, I still don't think we should bundle that version instead. |
Would using jemalloc as allocator help with performance? I would guess that musl's allocator is slower than glibc's and that this is the cause for the perf regression. |
I think we tested once and jemalloc and LTO and whatever made the MUSL version about as fast as the vanilla GLIBC one. Though MUSL 1.2.1 should have an improved allocator, but I didn't test it. |
CC #13086 |
Maybe you can use https://github.com/messense/cargo-zigbuild to cross-compile/target older glibc. |
This is going to cause pain for every single rust developer at my org, because our current developer VM is, and will be, for at least the rest of the year, and probably into next year, be Ubuntu 18.04 :/ I really think rust-analyzer needs to provide advanced notice for this. |
If it is possible to fork a version on vscode market which supports old system version like ubuntu 18.04. |
When I try to roll back to old vrsion by "install another version", it does not work in most cases(after click, nothing happened). Also, it's quite unclear to stop auto update extension(for remote environment). |
@hanbu97 Maybe it is slow. After 1~2 minutes it will show. It is exactly what I experienced. |
I am using a local dev container. Recreating the container with bullseye instead of buster allows 0.3.1186 to run successfully. Hope that helps someone. |
As workaround, I compile rust-analyzer manually, and replace the bundled one in vscode-server.
|
thanks |
If you decide to improve the compatibility of the non-rustup released binaries, you might look at how rustup itself borrows the docker images we create in rust-lang/rust dist CI. |
There are many people have to use older OS release version for some reason. I don't understand why RA upgrade build system again and again without consider compatibility, broken ours workflow and toolchains. |
I am having the same problem with slow / unreliable downgrades via the VS Code user interface. I ended up downgrading manually. If you are running a 64-bit Linux system, you can download and install via the command-line # cd into the folder where you downloaded the extension
code --install-extension rust-analyzer-linux-x64.vsix And disable auto-updates using File > Preferences > Settings, search for |
This should be reopened and reverted because this breaks automated tools that run in environments like docker that makes it very difficult to compile RA into it. |
Because GitHub dropped the outdated builder. We currently use their VMs to build the binaries, so we had to upgrade to the newer version of the distro.
Docker makes it easy to build from source, you don't depend on the binaries here. |
What automated tools do you have running rust-analyzer? |
How about not using GitHub to build it? Now GitHub decides to break the workflow of lots of users? A tool that suddenly stops working is not a tool one can rely on. |
Have you seen the rustup component for rust-analyzer? You can use |
Yeah there is always a solution. But this is still a bug and should be treated as such IMO. And I guess I will have to switch back to stable later. |
I did say that the fault is with glibc requiring programs compiled on a system with one version of glibc to only run on systems with at least that version of glibc even if all functions from glibc used by the program are available on earlier glibc versions. For as long as they don't fix that issue, everyone building glibc based programs has to complicate their CI by a lot to produce programs capable of running on older systems. This problem is unique to glibc (ignoring OSes that don't have any binary compatibility at all). Other linux libc implementations like musl don't have the same issue and neither do Windows and macOS. |
They aren't. I think there must have been a change in the standard library that made programs call some newer functions (
You don't need to use the beta or nightly toolchain to compile your programs, you just need RA from there. It will be promoted to stable in 13 days.
There are other, more important, platforms like Windows 32-bit for which we don't have binaries. Not even the Rust compiler is available on all platforms that Rust supports. If you still think this is a bug and I don't get a chance to do something about it this week-end, feel free to submit a pull request to fix it. Such are the ways of open-source. |
Adding to my earlier comment, here is the script that rustup uses to get the docker images from rust CI: I haven't looked at rust-analyzer's release process, but if it is updated to use the same images, it will end up with the same ABI compatibility as the rest of the rust toolchain. And we do know the RA build can technically work in that environment, because we are already building the |
IMO not having something available for a platform is not a bug. Suddenly opening VS Code and having to figure out why nothing is working, installing all updates and nothing, and having to search on the Internet, is a bug. Ideally, this would not happen. But if it is going to happen, at least RA should give us a nice message explaining it is no longer supporting certain platforms and providing instructions to fix it via rustup. It could also have the ability to fall back to an older version. If the project can't provide some stability perhaps it should release less frequently. It is the third time it breaks for me recently. Perhaps it has been just bad luck but this is starting to feel like JavaScript tooling 😆 Just my thoughts. |
This morning, I tried to use docker desktop to create a dev environment container and develop inside of it with VSC. I couldn't use the environment because VSC couldn't run RA specifically for this error, and I can't realistically build RA inside of that docker image. |
Was this a conscious decision? Can you revert it? It currently means that I can't use the latest release of rust-analyzer on my AL2 machine without attempting to do something as risky as updating my GLIBC...
The text was updated successfully, but these errors were encountered: