Description of problem: Qt Creator from Fedora 29 repositories fails to properly parse and follow Linux kernel source code. Version-Release number of selected component (if applicable): qt-creator-4.7.1-1.fc29, also tested qt-creator-4.7.2-1.fc29 from https://koji.fedoraproject.org/koji/buildinfo?buildID=1164004 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 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". Additional info: This works as expected in official build of the same version: http://download.qt.io/official_releases/qtcreator/4.7/4.7.2/qt-creator-opensource-linux-x86_64-4.7.2.run
Fix: https://src.fedoraproject.org/rpms/qt-creator/pull-request/2
I've submitted a f29 scratch build of qt-creator-4.8.0-rc here [1], can you give it a try? I'm planning for 4.8.0 final in f29 anyways, and release should happen any moment now. [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=31261958
(In reply to Sandro Mani from comment #2) > I've submitted a f29 scratch build of qt-creator-4.8.0-rc here [1], can you > give it a try? I'm planning for 4.8.0 final in f29 anyways, and release > should happen any moment now. > > [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=31261958 Same problem.
By the way, I just noticed that there is a reproduction step missing: 2.1 make defconfing && make # among other things, this generates some header files
Created attachment 1511458 [details] Version from https://koji.fedoraproject.org/koji/taskinfo?taskID=31261958
Created attachment 1511459 [details] Original binary from https://download.qt.io/development_releases/qtcreator/4.8/4.8.0-rc1/qt-creator-opensource-linux-x86_64-4.8.0-rc1.run
Created attachment 1511460 [details] Version built manually from https://src.fedoraproject.org/rpms/qt-creator/pull-request/3
Rebuilt 4.8.0-rc1 with LLVM/Clang 6.0 libraries[1]. Works as expected. To clarify this a bit: there is no full support of kernel development in Qt Creator either way, but it works significantly better when built with LLVM/Clang libraries 6.0 than with 7.0. See attached screenshots: 1. qtcreator-kernel-bad.png - https://bugzilla.redhat.com/attachment.cgi?id=1511458 - Version from your Koji link[2]. 2. qtcreator-kernel-bad.origbin.png - https://bugzilla.redhat.com/attachment.cgi?id=1511459 - Original binary from Qt developers[3]. Seems that starting with 4.8.* they are using LLVM 7.0 too, so it is broken in the same way. I'll create upstream bug report about this. 3. qtcreator-kernel-good.png - https://bugzilla.redhat.com/attachment.cgi?id=1511460 - Version built manually from[1]. Much more usable than the first two. Note the reduced amount of errors. [1] https://src.fedoraproject.org/rpms/qt-creator/pull-request/3 [2] https://koji.fedoraproject.org/koji/taskinfo?taskID=31261958 [3] https://download.qt.io/development_releases/qtcreator/4.8/4.8.0-rc1/qt-creator-opensource-linux-x86_64-4.8.0-rc1.run
Have you already reported the issue with nothing provides clang6.0(x86-64) = 6.0.1-5.fc29 needed by clang6.0-devel-6.0.1-5.fc29.x86_64 ?
Already reported by someone else: https://bugzilla.redhat.com/show_bug.cgi?id=1652292
How much better is LLVM 6.0 than LLVM 7.0? The clang6.0 package really only exists so that packages can have extra time to transition from 6.0 -> 7.0. It's not really meant to be used as an alternative to the main packages.
(In reply to Tom Stellard from comment #11) > How much better is LLVM 6.0 than LLVM 7.0? The clang6.0 package really only > exists so that packages can have extra time to transition from 6.0 -> 7.0. > It's not really meant to be used as an alternative to the main packages. With 6.0 code navigation works fine (find usages/follow symbol/etc.). With 7.0 it does not work because Qt Creator fails to parse the source code. Also, see attached screen shots.
Reproduced this again on Qt Creator 4.8.0 release (official binaries). Still works fine when rebuilt from source with LLVM/Clang 6.0.
Given Tom Stellards comment, realistically this is a WONTFIX, we will need upstream to improve the support for LLVM 7.