FS#54181 - [qtcreator] Missing Clang Code Model plugin

Attached to Project: Arch Linux
Opened by Luc (iq2luc) - Thursday, 25 May 2017, 07:41 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 25 May 2017, 17:07 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
* Clang Code Model plugin is missing, please set LLVM_INSTALL_DIR to build the Clang Code Model plugin

Additional info:
* package version: 4.3.0-1

Steps to reproduce:
* install qtcreator 4.3.0-1
* observe there is no /usr/lib/qtcreator/plugins/libClangCodeModel.so
* run qtcreator
* observe the Clang Code Model plugin is not available

Notes:
* Clang Code Model plugin was available with all previous versions of qtcreator pacakges (i.e. 4.2.2-3 and below)
* to solve the problem I just modified the PKGBUILD as follows: LLVM_INSTALL_DIR=/usr QBS_INSTALL_DIR=/usr qmake QMAKE_CFLAGS_ISYSTEM=-I CONFIG+=journald -r ../qt-creator-opensource-src-${pkgver}/qtcreator.pro (similar to previous package, version 4.2.2-3)
* I think this issue report is more like something between a feature request and a bug (bug only because it affects multiple users who are used to have Clang Code Model plugin in previous versions of the package)


Thanks,
Luc
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 25 May 2017, 17:07 GMT
Reason for closing:  Fixed
Additional comments about closing:  qtcreator 4.3.0-2
Comment by Slava (Slavas) - Thursday, 25 May 2017, 10:39 GMT
This is a bug and not a feature request, since there is no easy way to install that plugin separately, and it is the part of a binary package distributed by Qt.
Comment by HKKH (HKKH) - Thursday, 25 May 2017, 14:17 GMT
In Tools > Options > Analyzer there is a message:
Clang Version: 4.0.0, unsupported (supported version is 3.9).
Comment by Luc (iq2luc) - Thursday, 25 May 2017, 14:20 GMT
Hi HKKH, please pay attention to the issue -- it is about the Code Model not the Analyzer.

Editing the PKGBUILD (as noted in the issue details) solves the problem and the Clang Code Model plugin is properly built and everything works as expected.


Thanks,
Luc
Comment by HKKH (HKKH) - Thursday, 25 May 2017, 14:28 GMT
Hello Luc. I have an unrelated question, do you have qbs in qtcreator?
Comment by Luc (iq2luc) - Thursday, 25 May 2017, 14:33 GMT
Hello HKKH,

because of this issue I don't use the official package, so I modified the PKGBUILD and I use my version of the package instead.

To answer your question: yes, I built the Qbs Build System plugin but I don't use it so I disabled it.

Thanks,
Luc
Comment by Slava (Slavas) - Thursday, 25 May 2017, 14:45 GMT
Hi Luc,
I tried to copy the build() section from aur/qtcreator-prerelease (that includes LLVM_INSTALL_DIR) and still do not have libClangCodeModel.so in build/plugins folder, could you post your complete build() function?
Comment by Peet (orangecake) - Thursday, 25 May 2017, 16:18 GMT
I am not sure if it's just me but even with the ClangCodeModel activated it doesn't work here. Diagnostics and Auto-Completions are completely gone. Even though I can use the "Inspect the C++ Code Model". I suspect this is because of ArchLinux, since we are already on Clang 4.0.
Comment by Luc (iq2luc) - Thursday, 25 May 2017, 16:19 GMT
Hi Slava,

please find attached the files I use for myself.
The patch is needed to allow 'qtcreator' to use the 'qbs' package already provided in the system.


Thanks,
Luc
Comment by Peet (orangecake) - Thursday, 25 May 2017, 16:21 GMT
I am getting the following error:
Clang Code Model: Error: The clangbackend executable "/usr/lib/qtcreator/clangbackend" does not exist.
Comment by Luc (iq2luc) - Thursday, 25 May 2017, 16:24 GMT
Hi Peet,

that is because qtcreator expects them to be in '/usr/libexec/qtcreator'.
Make the package using the files I provided a few posts above, everything will work fine.

Thanks,
Luc

P.S.: I don't know why but the 'PKGBUILD' file was attached again to this post, although I didn't attached it. So I added the patch file too, just to be consistent.
Comment by Peet (orangecake) - Thursday, 25 May 2017, 16:35 GMT
@Luc Thank You. It works perfectly now :)
Comment by Luc (iq2luc) - Thursday, 25 May 2017, 16:40 GMT
My pleasure, enjoy.

Thanks,
Luc
Comment by Slava (Slavas) - Thursday, 25 May 2017, 16:41 GMT
Same here. Thanks a lot.
Comment by Luc (iq2luc) - Thursday, 25 May 2017, 16:53 GMT
Anytime a pleasure, I'm glad it helped.

Basically it seems there is a small issue with the main qtcreator.pro file, at least when we want to use the qbs package already in the system.
While deleting 'src/shared/qbs/qbs.pro' doesn't builds the internal qbs project anymore, it also doesn't set the 'qbs_enable_project_file_updates' (-DQBS_ENABLE_PROJECT_FILE_UPDATES ...) which in turn generates errors when building the Qbs Project Manager plugin (because some class methods are included or not depending on that definition). And this is the reason for providing an extra patch file.

Thanks,
Luc

Loading...