-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Closed
Labels
0.kind: bugSomething is brokenSomething is broken
Description
Describe the bug
RA (rust-analyzer
, the Rust LSP, in my case used from VSCode) started erroring like this:
Failed to run proc-macro server from path
/home/eddy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/libexec/rust-analyzer-proc-macro-srv,
error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
I believe that libexec
binary was added to Rust nightlies by @fasterthanlime's recent PR:
(I should've noticed this sooner, but I guess I hadn't updated everything involved yet?)
Steps To Reproduce
Steps to reproduce the behavior:
rustup update nightly
patchelf --print-interpreter $(rustc --print=sysroot)/{bin/rustc,libexec/rust-analyzer-proc-macro-srv}
Expected behavior
Binaries in bin
and libexec
should be patchelf
'd the same way - however, what we get is:
$ patchelf --print-interpreter $(rustc --print=sysroot)/bin/rustc
/nix/store/f3qlm2873bxlhxns4lrmrinvbzn933pj-glibc-2.34-210/lib/ld-linux-x86-64.so.2
$ patchelf --print-interpreter $(rustc --print=sysroot)/libexec/rust-analyzer-proc-macro-srv
/lib64/ld-linux-x86-64.so.2
Additional context
I believe this is happening because the rustup
auto-patchelf
logic hardcodes bin
/lib
:
nixpkgs/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch
Lines 18 to 19 in aaa1c97
+ let (is_bin, is_lib) = if let Some(p) = src_path.parent() { | |
+ (p.ends_with("bin"), p.ends_with("lib")) |
Presumably the p.ends_with("bin")
there should be changed to p.ends_with("bin") || p.ends_with("libexec")
?
Notify maintainers
Metadata
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 5.4.28, NixOS, 20.09pre-git (Nightingale), nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.9.1`
- channels(eddy): `"nixpkgs-22.11pre388097.9a17f325397"`
- channels(root): `"nixos-20.09pre218613.ae6bdcc5358"`
- nixpkgs: `/home/eddy/.nix-defexpr/channels/nixpkgs`
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken