0

So I'm working with Rust utilizing VSCode as my IDE. One issue I'm having is with Rust-Analyzer, which appears to be the currently recommended extension for rust support.

I have two different systems, which I routinely do remote work on. the first system, I install Rust-analyzer on the remote server with no issues. All the functionality appears to be working as expected. The second system, not so much. I've compared all the settings for both remote systems and they match 100%.

What is different is that glibc files don't appear on the 2nd system, while they are present on the 1st. So I installed glibc with apt, even though I was sure it was already there, as I believe glibc is part of the build-essentials package.

The first system is Ubuntu 18.04, while the 2nd system is Ubuntu Server 20.04.

running ldd --version results in:

First system:

:~/Development/rust$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.4) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Second System:

:~/dev/test-dcop$ ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.7) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

So it appears to be installed just fine, but I'm missing the libc* files from the /lib directory.

First system:

:~/Development/rust$ find /lib -iname 'libc*.so'
/lib/i386-linux-gnu/libcidn-2.27.so
/lib/i386-linux-gnu/libcrypt-2.27.so
/lib/i386-linux-gnu/libc-2.27.so
/lib/x86_64-linux-gnu/libcidn-2.27.so
/lib/x86_64-linux-gnu/libcrypt-2.27.so
/lib/x86_64-linux-gnu/libc-2.27.so

Second System:

:~/dev/test-dcop$ find /lib -iname 'libc*.so'
:~/dev/test-dcop$ 

And nothing for the 2nd system. Through my research, I've found several posts about VSCode needing these libraries.

How can I resolve this?

Michael
  • 263
  • 1
  • 5
  • 17

1 Answers1

0

The two systems between Ubuntu 18 and Ubuntu 20 had substantial updates, so the libraries may have been moved or renamed to a different location out of /lib -- since compiler/build libraries are user-space almost certainly don't belong there rather in /usr/lib or similar.

Reviewing the answer, and this is a total speculative wild-ass guess but perhaps a place to start, it reminds me of a similar problem i had.

There was a historical RUST language analyzer package before the current one (i forget the name), and I recall the other package had a fairly innocous sounding name "a good rust feature", snippets or something and of course it had like a bajillion stars so I clicked it.

But in the notes the packages are/were explicitly listed not all compatible i.e. a highlander scenario, "you must choose one" .. if both are installed, neither work.

So what I'm saying is you may have another plugin in vscode that is interfering or muddling your second environment.

Can you post a list of extensions from your vscode workspace & user settings.json that currently installed in both versions?

https://code.visualstudio.com/docs/getstarted/settings

Compare those files on both systems, and make sure they are actually setup correctly .. i.e. when you fix your second machine using settings.json, it might break your first machine.