Page 1 of 1

Incomplete support for Clang code completion on Ubuntu/Mint

Posted: Thu Nov 15, 2018 2:22 pm
by neildarlow
Hi,

clang-format is installed as a dependency when codelite-12.0-1unofficial is unstalled on Ubuntu/Mint but it appears that Clang code completion cannot be enabled because CodeLite hasn't been built against libclang1 which, I believe, is required to support Clang code completion. Is this a correct assessment of the situation?

Regards,
Neil

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Posted: Thu Nov 15, 2018 3:52 pm
by eranif
I can't really tell, as I don't know the situation or what error are you experiencing...
Can you please provide details about the problem you are having?

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Posted: Thu Nov 15, 2018 4:04 pm
by neildarlow
The clang-format based code completion dialog contents are greyed-out.

Out of interest, I removed the codelite-12.0-1unofficial package, its repository and all dependencies and then installed the weekly codelite-12.0.10 for Bionic GTK3 variant.

I can configure clang-format code completion with this version so, going by available information on building codelite, it appears that clang-format code completion isn't enabled in the 12.0-1unoffical package.

Regards,
Neil

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Posted: Thu Nov 15, 2018 4:33 pm
by eranif
It should be available, I will try it out at home later today.
Just for FYI: clang-format is a tool that simply beautifies your code, it does not provide code completion. What you are referring here is code completion based on libclang

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Posted: Thu Nov 15, 2018 6:59 pm
by DavidGH
Hi,

(This is about clang code-completion, not clang-format.)
Making CodeLite's CMakeLists.txt believe that clang exists on ubuntu became much harder 2 or 3 years ago, when for some reason the libclang-dev package vanished.

I see it's now there again in ubuntu bionic, and it was installed on my build VBox guest. However it (or something else) still doesn't seem to be detected, and the error message: *** NOTICE ***: clang code completion support is disabled" still appears.

To be honest, I didn't pursue this; I don't use clang code-completion myself and, if the lack of posts/bug-reports is anything to go by, nor do many users ;) .

Regards,

David

Re: Incomplete support for Clang code completion on Ubuntu/Mint

Posted: Thu Nov 15, 2018 10:44 pm
by neildarlow
DavidGH wrote:Hi,
(This is about clang code-completion, not clang-format.)
Making CodeLite's CMakeLists.txt believe that clang exists on ubuntu became much harder 2 or 3 years ago, when for some reason the libclang-dev package vanished.
Yes, it's confusing when a technology is used in two differing aspects and I'm probably suffering the consequences.

Clang detection in the CMake build system is still a problem. I add the following environment variables to my Clang/CMake projects to force its use:

Code: Select all

CC=/usr/bin/clang
CXX=/usr/bin/clang++
The issue with clang-format is, of course, with Source Code Formatting. Code completion is related to use of libclang-6.0-dev and libclang1-6.0.

Regards,
Neil Darlow