rls completely fails to start on Debian Buster (x86_64)
I've been trying to get rls working with my Emacs's lsp-mode. Emacs keeps complaining that the server didn't start:
LSP :: Restarting LSP in buffer main.rs
LSP :: Connected to [rls:10458 status:starting].
LSP :: rls has exited (finished)
Server rls:10458 status:starting exited with status exit. Do you want to restart it? (y or n) y
I've been trying to get something out of it from the command line. Both rls --help and rls --cli just seem to exit straight away without any output making it hard to glean what might be wrong. The install details are as follows:
$ cargo install rls
Updating crates.io index
Installing rls v0.122.2
Compiling rls v0.122.2
Finished release [optimized] target(s) in 1.78s
Installing /home/alex/.cargo/bin/rls
Installed package `rls v0.122.2` (executable `rls`)
but even under strace it seems to exit super quickly:
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "55721ee4d000-55721ee51000 r--p 0"..., 1024) = 1024
read(3, " /usr/lib/x86_64-linux-g"..., 1024) = 1024
read(3, " r--p 00000000 fd:00 2629296 "..., 1024) = 1024
read(3, " /usr/lib/x86_64-linux-gnu/libr"..., 1024) = 1024
read(3, "f000 fd:00 2629272 "..., 1024) = 585
close(3) = 0
sched_getaffinity(19644, 32, [0, 1, 2, 3, 4, 5, 6, 7]) = 32
rt_sigaction(SIGSEGV, {sa_handler=0x55721ee576d0, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7feb4b333730}, NULL, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x55721ee576d0, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7feb4b333730}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7feb4b388000
sigaltstack({ss_sp=0x7feb4b388000, ss_flags=0, ss_size=8192}, NULL) = 0
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x7feb4b388000, 8192) = 0
exit_group(0) = ?
+++ exited with 0 +++
Any pointers on how to debug what is going on?
Did you install it via rustup as described in the README or did you install it via cargo? Because the version cargo pulls from crates.io is just an empty placeholder.
@troethe yeah it was from cargo - switching to rustup works. I does seem a bit silly to have a place-holder binary in cargo that gives no clue as to why it fails. Following guides for the LSP's didn't say anything special about installing rls via something other than cargo which is why I never saw the README here.