Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 4.8.0
-
GNU/Linux distributions
-
-
b5b9b7e32c26245ad5f6d41a31be036f30088ea3
Description
Qt Creator's plugin for the clang code model shouldn't hard code the include path for clang.
Hard coding the path leads to issues like https://bugs.archlinux.org/task/56821 where the code model is broken with the error message `fatal error: 'stddef.h' file not found`. The problem was also recently observed on Tumbleweed.
In fact, likely any distribution is affected unless they rebuild Qt Creator after updating clang. Since the include path contains the full version of clang (e.g. `/usr/lib64/clang/7.0.0/include`) the rebuild would be required forĀ every update and not only major releases.
This bug is similar to https://bugreports.qt.io/browse/QTBUG-70687.
So far I only reproduced this with Qt Creator 4.5.0 and 4.8.0 but other versions are likely affected as well.
Suggested fix: The path is somehow detected at compile time. So in theory it must be possible to move that logic to Qt Creator's run-time code so it is able to detect the path dynamically.
—
By the way: I'm aware that one can already find similar tickets when searching for "stddef.h" on this bug tracker. Likely these tickets are related. However, none of them states clearly the source of the problem so I created a new ticket which is hopefully concrete enough so someone is able to work on it.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-23451 Code model can't find compiler-supplied headers (stdarg.h, stddef.h, immintrin.h, etc.)
- Closed
-
QTCREATORBUG-24583 Warning: The code model could not parse an included file, which might lead...
- Closed