-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add compiler querying support for QNX QCC #11853
Comments
Hi @samkearney . Could you enable the setting Given that there exists documentation of specific command line arguments for QCC, I suspect it is not command-line compatible with GCC. Currenttly, the C/C++ extension supports detection of configuration information (system include paths and system defines) from compilers that are command-line compatible with GCC and Clang. If that is the problem, we can consider this issue a feature request to add compiler-querying support for QCC, if possible. (This is dependent on the compiler having command-line options, such as those supported by GCC and clang, which can be used to solicit system include paths and system defines from the compiler. Though, the list of arguments supported by QCC seems very limited.) |
Hi @Colengms, Thank you for the troubleshooting advice! You have pointed me in the right direction: Log Output
I encountered two issues with the command line arguments for querying the compiler. The first one was set(CMAKE_CXX_COMPILER_TARGET "5.4.0,gcc_ntox86_gpp") # note: variables expanded Looks like this is an instance of CMake differing from the extension somehow, because the command line generated by CMake is Unfortunately if I try to work around this by adding that
Having looked up QCC is QNX's "frontend" compiler, which passes sources and arguments through to a GCC-based cross compiler (after verifying your license 😄), but I see that their command line interface leaves a bit to be desired in terms of full GCC compatibility. However, after playing around with qcc at the command line, I think it could work to pass that argument using Snip
I don't have any way of knowing if there are further incompatibilities hiding behind this one (are there more queries with potentially more unsupported arguments?) but I think this could be a decent starting point for a feature request for QCC support:
Thanks! |
Oh, and just to check off the remaining things from your message:
I agree.
I think this might have something to do with the dev container I'm using. It's detecting clang, but when I jump to definition it goes to a GCC C++ header. I'm assuming that's what's causing the squiggles. It's based on a stock Ubuntu docker image, and I have LLVM 15 installed in there so I can use clang-format and clang-tidy, but I'm not using clang itself (or native GCC for that matter). Anyway, not really relevant to my issue, but I wanted to satisfy my curiosity. |
This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog. |
🤔 This is a pretty niche toolchain, so I don't see this feature request getting "enough upvotes", whatever that may be. @Colengms should I give up hope on this? Can I implement it myself? I tried to find in the code where this compiler querying is done but with no luck. Maybe you could point me in the right direction? |
@samkearney, when we finish #6931, it will probably be your best option. |
This feature would be great! Being able to fully use vscode over the shipped ide of qnx like this would be great! |
Environment
Bug Summary and Steps to Reproduce
Bug Summary: I am working on C++ projects with a cross-compilation toolchain, the QNX Software Development Platform, which ships a GCC-compatible compiler. I configure my projects using CMake with a custom toolchain file which builds with this compiler, and there are no errors. But Intellisense shows red squiggles under random symbols and errors that don't correspond to what happens when I build the project, and "Go to Definition" sometimes takes me into native Linux system headers rather than the QNX SDP provided headers (which I expect, because I provided the compiler and sysroot in the CMake toolchain file).
When I do "Log Diagnostics", I can see that it seems like some of the settings are correct (e.g. my cross-compiler and arguments appear in the results) but some are incorrect (there are some sections that seem to be configured with native system tools)
Unfortunately, I don't think it will be possible to reproduce this issue without a licensed copy of the QNX SDP. But I would appreciate any debugging advice.
This has worked for me in the past. I'm not sure what changed.
Steps to reproduce:
CMakeUserPresets.json
which selects this toolchain file, and configure the project using the CMake Tools extension.Expected behavior:
Intellisense works properly
Actual behavior:
![image](https://private-user-images.githubusercontent.com/5142299/295306540-51675aa5-dcbd-436f-9ee5-775265fbb62d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjE4MTMsIm5iZiI6MTczOTIyMTUxMywicGF0aCI6Ii81MTQyMjk5LzI5NTMwNjU0MC01MTY3NWFhNS1kY2JkLTQzNmYtOWVlNS03NzUyNjVmYmI2MmQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMjEwNTEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmMzODRhMTRmOWQzYzg0MjEwM2JkMjM5MTc0NjgwZDI1NDc4MDBiNWVjYjE1M2JmM2EwN2I5MGU0N2YzMjdmZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.rr3HcCUJwyG_-Hp0XHOoL6vS35doa8RS7NIllNqKXbQ)
False error squiggles are shown:
(these errors do not appear when I build the project using the CMake Tools extension)
"Go To Definition" produces the wrong result:
![gtd](https://private-user-images.githubusercontent.com/5142299/295307283-89e079ea-f80c-40df-a623-af26dcbf91f7.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjE4MTMsIm5iZiI6MTczOTIyMTUxMywicGF0aCI6Ii81MTQyMjk5LzI5NTMwNzI4My04OWUwNzllYS1mODBjLTQwZGYtYTYyMy1hZjI2ZGNiZjkxZjcuZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMjEwNTEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjNlMTNhMzEzOTVkNGIzY2M5ZmFkYWEyZWNkMjQ0YmUzZGRhN2UxZTA5MDNkZTgyMDdmYzE0YjFkZDJhY2Y4NyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.tO62BCdFfyiSavUyOCteiJEBxXlfObYwCObiUfmHuW8)
(I would expect the path of the resolved header to be
/opt/qnx700/target/qnx7/usr/include/c++/5.4.0/iostream
)Configuration and Logs
Other Extensions
No response
Additional context
Contents of my CMake toolchain file:
The text was updated successfully, but these errors were encountered: