Home » Language IDEs » C / C++ IDE (CDT) » Eclipse 2020-12 on Ubuntu - can't find llvm toolchain
Eclipse 2020-12 on Ubuntu - can't find llvm toolchain [message #1838550] |
Mon, 01 March 2021 10:58 |
John McCabe Messages: 228 Registered: July 2009 |
Senior Member |
|
|
Hi,
I've been using Eclipse with gcc on Ubuntu for a while, and just installed clang/llvm on to compare it. However, even though I can run clang from the command line (it's soft linked in /usr/bin) and setup Eclipse to use the installed clang (13) toolchain, I have to untick the box that says to only show compatible toolchains.
Once I do that, I get the message, in the settings, about:
Toolchain "LLVM with Clang (Linux)" is not detected. Refer to "C/C++ Development User Guide", "Before you begin" how to install toolchains.
Which, helpfully, takes me to a section that says:
Linux
All Linux distributions include the GNU toolchain. They may not, however, be installed by default. For instructions about installing the GNU toolchain for Linux, see the instructions for your particular distribution.
Also, presumably related, there's no LLVM section in the preferences.
I'm assuming this is a path-related thing in that Eclipse is looking for something specific to decide whether LLVM/Clang is compatible, but I've tried adding the obvious stuff to my path, e.g. /usr/lib/clang-13, /usr/lib/clang-13/bin, but I'm still at a loss as to how to get Eclipse to recognise, if possible, the clang/LLVM installation.
Any pointers would be gratefully appreciated. I've searched through this forum, but the vast majority of "can't see clang" stuff is from people trying to use it on Windows, so...
Thanks.
|
|
| |
Re: Eclipse 2020-12 on Ubuntu - can't find llvm toolchain [message #1838559 is a reply to message #1838553] |
Mon, 01 March 2021 12:16 |
John McCabe Messages: 228 Registered: July 2009 |
Senior Member |
|
|
xueyao feng wrote on Mon, 01 March 2021 06:39have you ever added your llvm tooolchain variable which point to the clang bin path to your .bashrc file?,if not, that may cause the problem you face with
Thank you for your reply; do you mean there's an environment variable that also needs to be set? I hadn't found any reference to that anywhere; if you could let me know, or point me to the specifics (i.e. what's it called!) that would be great.
I'll search, in the meantime, but your further help would be very much appreciated.
[Updated on: Mon, 01 March 2021 12:16] Report message to a moderator
|
|
| |
Re: Eclipse 2020-12 on Ubuntu - can't find llvm toolchain [message #1838601 is a reply to message #1838585] |
Tue, 02 March 2021 10:06 |
John McCabe Messages: 228 Registered: July 2009 |
Senior Member |
|
|
Many thanks for your reply.
For what it's worth though, and this is a bit of an aaaaarrrrrrgggghhhh moment, the problem was that I was adding /usr/lib/llvm-13/bin to my path then running eclipse using an alias "~/<path-to-eclipse>/eclipse &", so the path I was setting up wasn't the one that Eclipse was using when it got launched. D'oh!
Adding /usr/lib/llvm-13/bin to the path in my .profile (I don't have ~/.bash_profile or ~/.bash_login) seems to have sorted the issue out and I can now see LLVM with clang and LLVM with gcc as supported toolchains.
[Updated on: Tue, 02 March 2021 11:41] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed Apr 24 22:29:39 GMT 2024
Powered by FUDForum. Page generated in 0.02804 seconds
|