I’ve worked with Windows OS for over 25 years and only recently switched to Linux OS… so lots to learn.
I’m using Linux Mint 19 (Ubuntu 18.04).
I installed Mbed Studio and got a message to say that it could not find clangd, which it needed for Intellisense.
I checked my package manager and indeed that package was not installed on my computer.
Now, I’ve noticed with my other software download and installs, it will tell you if it needs additional packages to operate and gives you that chance to install together. So why was this not done for the clangd package when I installed Mbed Studio?
I then went onto the llvm.org website and downloaded and installed as follows:
Getting started
Using “clangd --version” command it returns: clangd version 10.0.0-4ubuntu1~18.04.1
Yet, I am still getting that error message in Mbed Studio.
Error starting C/C++ language server. Please make sure ‘clangd’ is installed on your system. You can refer to the clangd page for instructions.
What’s missing?
PS. I’ve no idea if this is related.
This was found in the mbed-studio.log file found in the “home/####/.config/Mbed Studio” folder.
[2020-07-10T11:04:26.660] [ERROR] root/mbs-cpp-config - C/C++ configuration generation failed:
/home/####/.config/Mbed Studio/mbed-studio-tools/python/bin/python: can’t open file ‘/home/####/.config/Mbed Studio/mbed-studio-tools/clangd/generate_compile_commands.py’: [Errno 2] No such file or directory
[2020-07-10T11:04:26.660] [ERROR] MbedStudio - Request generateConfig failed with error: C/C++ configuration generation failed:
/home/####/.config/Mbed Studio/mbed-studio-tools/python/bin/python: can’t open file ‘/home/####/.config/Mbed Studio/mbed-studio-tools/clangd/generate_compile_commands.py’: [Errno 2] No such file or directory [ ‘Error: C/C++ configuration generation failed:\n/home/####/.config/Mbed Studio/mbed-studio-tools/python/bin/python: can't open file '/home/####/.config/Mbed Studio/mbed-studio-tools/clangd/generate_compile_commands.py': [Errno 2] No such file or directory\n at ConfigurationCppServerImpl. (/tmp/.mount_mbed-sKcdxtf/resources/app/node_modules/@mbed/mbs-cpp-config/lib/backend/config-server.js:103:31)\n at step (/tmp/.mount_mbed-sKcdxtf/resources/app/node_modules/@mbed/mbs-cpp-config/lib/backend/config-server.js:47:23)\n at Object.throw (/tmp/.mount_mbed-sKcdxtf/resources/app/node_modules/@mbed/mbs-cpp-config/lib/backend/config-server.js:28:53)\n at rejected (/tmp/.mount_mbed-sKcdxtf/resources/app/node_modules/@mbed/mbs-cpp-config/lib/backend/config-server.js:20:65)’ ]
[2020-07-10T11:04:26.662] [WARN] root/mbs-cpp-config - Failed to generate compilation database: Error: Request generateConfig failed with message: C/C++ configuration generation failed:
/home/####/.config/Mbed Studio/mbed-studio-tools/python/bin/python: can’t open file ‘/home/####/.config/Mbed Studio/mbed-studio-tools/clangd/generate_compile_commands.py’: [Errno 2] No such file or directory