Author Topic: clangd plug-in can not find clangd  (Read 7489 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
clangd plug-in can not find clangd
« on: January 29, 2024, 05:26:45 pm »
Today build CB on a TumbleWeed distribution, all went fine.
It also contains clang (and clangd) in /usr/bin ,adn it is version 17.0.6.
Compiler detected by CB, the plug-in kind of detected clangd, the path in the settings is correctly specified. However the plug-in keep saying :
clangd_client plugin could not auto detect a clangd installation. PLease enter the location of clangd using ....

Aka the settings tab, where the correct path is present, but to no advantage it seems.

Suggestions ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #1 on: January 29, 2024, 09:14:42 pm »
Today build CB on a TumbleWeed distribution, all went fine.
It also contains clang (and clangd) in /usr/bin ,adn it is version 17.0.6.
Compiler detected by CB, the plug-in kind of detected clangd, the path in the settings is correctly specified. However the plug-in keep saying :
clangd_client plugin could not auto detect a clangd installation. PLease enter the location of clangd using ....

Aka the settings tab, where the correct path is present, but to no advantage it seems.

Suggestions ?
This is caused by the clangd_plugin not finding the clangd resources not the executable (most likely).
They keep changing how they name the resources and we keep fixing it.

Let me see if I can find a the right question to ask to find the resources.
« Last Edit: January 29, 2024, 09:16:30 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #2 on: January 29, 2024, 09:46:47 pm »
Today build CB on a TumbleWeed distribution, all went fine.
It also contains clang (and clangd) in /usr/bin ,adn it is version 17.0.6.
Compiler detected by CB, the plug-in kind of detected clangd, the path in the settings is correctly specified. However the plug-in keep saying :
clangd_client plugin could not auto detect a clangd installation. PLease enter the location of clangd using ....

Aka the settings tab, where the correct path is present, but to no advantage it seems.

Suggestions ?
On that system, please show the output clangd --version
Then cd to /lib/clang and show all the folder names .
We want to know how they named the clang resources.

For example:
Code
 F:\usr\programs\msys64_13.0.1\mingw64\bin\clangd.exe --version
clangd version 16.0.5
Features: windows
Platform: x86_64-w64-windows-gnu

S F:\usr\programs\msys64_13.0.1\mingw64> cd lib
PS F:\usr\programs\msys64_13.0.1\mingw64\lib> cd clang
PS F:\usr\programs\msys64_13.0.1\mingw64\lib\clang> ls


    Directory: F:\usr\programs\msys64_13.0.1\mingw64\lib\clang


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         6/29/2023  11:28 AM                16

Note that in my case the clangd version and it's resource do not match. We have to compensate for that.

On Linux Mint it's different:
Code
pecan@LinuxMint:/usr/bin$ clangd --version
Ubuntu clangd version 14.0.0-1ubuntu1.1
Features: linux+grpc
Platform: x86_64-pc-linux-gnu
pecan@LinuxMint:/usr/bin$ cd /lib/clang
pecan@LinuxMint:/lib/clang$ ls
14  14.0.0
pecan@LinuxMint:/lib/clang$
« Last Edit: January 29, 2024, 09:59:09 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #3 on: January 30, 2024, 02:56:41 am »
I've just spent 45 minutes trying to download TumbleWeed Liinux. It seems to be dead and suggesting to use Leap instead.

Am I barking up the wrong tree?
Do we want to spend hours/days supporting a dead distribution?

Does anyone know how I can download an ISO to load into VMware?
« Last Edit: January 30, 2024, 03:02:43 am by Pecan »

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: clangd plug-in can not find clangd
« Reply #4 on: January 30, 2024, 03:37:46 am »
Where I live, I can download Tumbleweed via https://mirrors.ustc.edu.cn/opensuse/tumbleweed/iso/.
But I don't know whether you can access it.
« Last Edit: January 30, 2024, 03:48:06 am by Grit Clef »
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Online Commaster

  • Almost regular
  • **
  • Posts: 171
Re: clangd plug-in can not find clangd
« Reply #5 on: January 30, 2024, 04:39:48 am »
I hope you are picking the right Tumbleweed...
https://get.opensuse.org/tumbleweed/

Leap is a normal distribution, assembled annually and has version numbers.
Tumbleweed is like gentoo, there's a new iso almost daily and the packages are updated forever.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #6 on: January 30, 2024, 05:12:06 am »
I hope you are picking the right Tumbleweed...
https://get.opensuse.org/tumbleweed/

Leap is a normal distribution, assembled annually and has version numbers.
Tumbleweed is like gentoo, there's a new iso almost daily and the packages are updated forever.

Thanks, I don't know why this page didn't show up in my Google search.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: clangd plug-in can not find clangd
« Reply #7 on: January 30, 2024, 12:14:15 pm »
clangd --version
clangd version 17.0.6
Features: linux
Platform: x86_64-suse-linux


which clang
/usr/bin/clang


which clangd
/usr/bin/clangd


cd /usr/lib64/clang/
ls
17



lib64 versus lib ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #8 on: January 30, 2024, 06:39:21 pm »
clangd --version
clangd version 17.0.6
Features: linux
Platform: x86_64-suse-linux


which clang
/usr/bin/clang


which clangd
/usr/bin/clangd


cd /usr/lib64/clang/
ls
17



lib64 versus lib ?

Yep ! How are we suppose to guess what the lib name is ?

Is this just one of those cased that we keep adding names to check until no user complains?

Is there a way in Linux other than just keeping an array of lib names ?

Edit:
Oh, I know what to do, display an enumeration of /lib* and let the user choose, else if only one, choose it by default.

« Last Edit: January 30, 2024, 07:47:12 pm by Pecan »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: clangd plug-in can not find clangd
« Reply #9 on: January 31, 2024, 05:28:01 pm »
can't you just try to find it in both, I would suggest starting with lib64, and if not found lib ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #10 on: January 31, 2024, 05:44:29 pm »
can't you just try to find it in both, I would suggest starting with lib64, and if not found lib ?

Agreed

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #11 on: February 01, 2024, 08:57:14 pm »
Hopefully fixed in Head rev 13442

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: clangd plug-in can not find clangd
« Reply #12 on: February 01, 2024, 11:17:16 pm »
the pop-up boxes are gone. and the cc is working.

This can be seen in the cb log panel (bad or good ?)

 FindClangResourceDirs: Error opening directory /usr/lib64/mysql/plugin/auth_pam_tool_dir
 FindClangResourceDirs: Error opening directory /usr/etc/X11/xdm/authdir
 FindClangResourceDirs: Error opening directory /usr/etc/skel/.cache
 FindClangResourceDirs: Error opening directory /usr/etc/skel/.config
 FindClangResourceDirs: Error opening directory /usr/etc/skel/.local
 FindClangResourceDirs: Error opening directory /usr/etc/keys
 FindClangResourceDirs: Error opening directory /usr/etc/sudoers.d
 FindClangResourceDirs: Error opening directory /usr/libexec/ppp
« Last Edit: February 01, 2024, 11:21:43 pm by killerbot »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2813
Re: clangd plug-in can not find clangd
« Reply #13 on: February 02, 2024, 12:56:23 am »
the pop-up boxes are gone. and the cc is working.

This can be seen in the cb log panel (bad or good ?)

 FindClangResourceDirs: Error opening directory /usr/lib64/mysql/plugin/auth_pam_tool_dir
 FindClangResourceDirs: Error opening directory /usr/etc/X11/xdm/authdir
 FindClangResourceDirs: Error opening directory /usr/etc/skel/.cache
 FindClangResourceDirs: Error opening directory /usr/etc/skel/.config
 FindClangResourceDirs: Error opening directory /usr/etc/skel/.local
 FindClangResourceDirs: Error opening directory /usr/etc/keys
 FindClangResourceDirs: Error opening directory /usr/etc/sudoers.d
 FindClangResourceDirs: Error opening directory /usr/libexec/ppp

Thanks,
Hmmm, seems I forgot to comment out some debugging output.
And I don't know why the code is searching the non *lib* dirs.
I'll see if I can fix that.
« Last Edit: February 02, 2024, 01:08:01 am by Pecan »