Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.8.0-rc1, Qt Creator 4.8.0, Qt Creator 4.9.0-beta1
-
None
-
-
0a3aa12962e47db2421ad09d149118b920e404c8 (qt-creator/qt-creator/4.9)
Description
Qt Creator works with Linux kernel source tree much better when built with LLVM/Clang libraries version 6.0 instead of version 7.0. Originally I found this when trying to use Qt Creator from Fedora 29 repositories: RHBZ #1655852, but starting with Qt Creator 4.8, this also affects official builds.
I tested following versions so far:
- Qt Creator 4.7.2, official binary (LLVM libs 6.0) - good.
- Qt Creator 4.7.2, Fedora RPM (LLVM libs 7.0) - bad.
- Qt Creator 4.7.2, manually built with LLVM libs 6.0 - good.
- Qt Creator 4.8.0-rc1, official binary (LLVM libs 7.0) - bad, see attached qtcreator-kernel-bad.origbin.png.
- Qt Creator 4.8.0-rc1, Fedora RPM (LLVM libs 7.0) - bad, see attached qtcreator-kernel-bad.png.
- Qt Creator 4.8.0-rc1, manually built with LLVM libs 6.0 - good, see attached qtcreator-kernel-good.png.
Information from original bug report for Fedora:
How reproducible:
Always.
Steps to Reproduce:
1. Clone Linux kernel git repository (for example, from https://github.com/torvalds/linux/)
2. git checkout 0072a0c14d5b7cb72c611d396f143f5dcd73ebe2 # to reproduce this precisely
2.1. make defconfing && make # among other things, this generates some header files
3. In Qt Creator, open "File" -> "New File or Project"
4. Choose "Import Project" template
5. Choose "Import Existing Project"
6. Press "Choose..."
7. Set some project name (like "linux-kernel"), point "Location" to the git-cloned kernel source tree
8. Press "Next"
9. Press "Next" again in file selection dialog
10. Set "Add to version control" to "<None>"
11. Press "Finish"
12. In $PROJECT_NAME.includes remove everything and then add:
arch/x86/include
arch/x86/include/uapi
include
include/uapi
13. In $PROJECT_NAME.config add:
#include "linux/kconfig.h"
#define _KERNEL_ 1
14. Wait until Qt Creator finishes parsing the source code. It is slow... Progress bar is at bottom right.
15. Using left panel, open "drivers/scsi/hpsa.c"
16. Find first occurrence of "dma_map_single"
17. Hold "Ctrl" and try left click on "dma_map_single"
Actual results:
Nothing happens.
Expected results:
Qt Creator should open another file and jump to definition of "dma_map_single".
Attachments
For Gerrit Dashboard: QTCREATORBUG-21637 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
254119,2 | Clang: Follow symbol with Ctrl+click on invalid cursors | 4.9 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |