Opened 11 months ago
Last modified 6 weeks ago
#68987 assigned defect
rust-analyzer @20231204: Failed to spawn proc-macro servers
Reported by: | l2dy (Zero King) | Owned by: | herbygillot (Herby Gillot) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), mhjacobson (Matt Jacobson) | |
Port: | rust-analyzer rust-src |
Description
Attempting to use rust-analyzer with Eglot returns the following error.
[eglot] Server reports (type=2): Failed to spawn one or more proc-macro servers. - cannot find proc-macro-srv, the workspace `.../cargo2port` is missing a sysroot Failed to find sysroot for Cargo.toml file .../cargo2port/Cargo.toml. Is rust-src installed? can't load standard library from sysroot /opt/local (discovered via `rustc --print sysroot`) try installing the Rust source the same way you installed rustc
rust-src
seems to install source files under /opt/local/libexec/rust/src
, which does not match what rustc --print sysroot
returns.
See also https://github.com/rust-lang/rust-analyzer/issues/16001.
Change History (2)
comment:1 Changed 6 weeks ago by mhjacobson (Matt Jacobson)
comment:2 Changed 6 weeks ago by mhjacobson (Matt Jacobson)
Cc: | mhjacobson added |
---|
Note: See
TracTickets for help on using
tickets.
I'm having the same problem with rust-src @1.81.0_0 (and rust @1.81.0_0).
I worked around it with: