Repository navigation
Failed to query compiler (1.2.0) #6898
Copy link
Copy link
Closed
Labels
Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.regressionA bug that didn't exist in a previous releaseA bug that didn't exist in a previous release
Milestone
Description
Type: LanguageService
C/C++
Describe the bug
- OS and Version: Windows 10 x64 but the extension runs on Linux (Remote Development extension)
- VS Code Version: 1.52.1
- C/C++ Extension Version: 1.2.0
- Other extensions you installed (and if the issue persists after disabling them): Yes
- Does this issue involve using SSH remote to run the extension on a remote machine?: Yes
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc) : I'm working on with the extension
With the new version 1.2.0, the extension fails to query the compiler for default standard version and then disable it.
VsCode then starts to shows many errors in the code whereas the previous version 1.1.3 everything was fine.
I started to see this in the insider also few weeks ago so I went back to the standard version.
The debug log on 1.2.0 says:
cpptools/didChangeCppProperties
Attempting to get defaults from C compiler in "compilerPath" property: '/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc'
Querying compiler for default C++ language standard using command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -x c++ -E -dM /dev/null
terminating child process: 74933
Detected language standard version: gnu++98
Querying compiler for default C language standard using command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -x c -E -dM /dev/null
terminating child process: 74935
Failed to query compiler at path "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" for default standard versions. Compiler querying is disabled for this compiler.
Querying compiler's default target using command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -dumpmachine
Compiler returned default target value: arm-oe-linux-gnueabi
terminating child process: 74937
Compiler query command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=c89 -Wp,-v -E -dD -x c /dev/null
terminating child process: 74938
Code browsing service initialized
Attempting to get defaults from C++ compiler in "compilerPath" property: '/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc'
Compiler query command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=gnu++98 -Wp,-v -E -dD -x c++ /dev/null
terminating child process: 74941
With the previous version 1.1.3 - There was no errors in the logs
cpptools/didChangeCppProperties
Attempting to get defaults from C compiler in "compilerPath" property: '/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc'
Probing compiler for default C language standard using command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -x c -E -dM /dev/null
terminating child process: 74537
Probing compiler for default C++ language standard using command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -x c++ -E -dM /dev/null
terminating child process: 74539
Probing compiler's default target using command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -dumpmachine
Compiler returned default target value: arm-oe-linux-gnueabi
terminating child process: 74541
Compiler probe command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=c17 -Wp,-v -E -dD -x c /dev/null
terminating child process: 74542
Compiler probe command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=c11 -Wp,-v -E -dD -x c /dev/null
terminating child process: 74543
Code browsing service initialized
Attempting to get defaults from C++ compiler in "compilerPath" property: '/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc'
Compiler probe command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=c++17 -Wp,-v -E -dD -x c++ /dev/null
terminating child process: 74546
Compiler probe command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=c++1z -Wp,-v -E -dD -x c++ /dev/null
terminating child process: 74547
Compiler probe command line: "/opt/toolchain/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc" -E --sysroot=/opt/telit/sysroot -std=c++14 -Wp,-v -E -dD -x c++ /dev/null
terminating child process: 74548
Steps to reproduce
- enable debug C_Cpp logging level = Debug
- restart vs code
- open Output > C/C++
Expected behavior
1.2.0 behave like 1.1.3
Screenshots
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.regressionA bug that didn't exist in a previous releaseA bug that didn't exist in a previous release

Activity
Colengms commentedon Feb 3, 2021
Hi Erwan (@nonprenom) . With #6314 , we now avoid invoking executables that do not appear to be valid compilers, based on whether we detect certain defines that are required by the C or C++ standard. It looks like the compiler you are using diverges from what we are expecting, so we can't confirm it's valid.
Could you point me to how I can get this particular compiler installed, or provide the output of passing the following args to it? -x c -E -dM /dev/null
Colengms commentedon Feb 3, 2021
Actually, I think I have a fix for this. I'll see if we can release a 1.2.1 with this fix.
nonprenom commentedon Feb 4, 2021
Hi Colen Garoutte-Carson (@Colengms), thanks for your answer.
please find the result below -x c -E -dM /dev/null with the toolchain.
I compared the results with arm-oe-linux-gnueabi-gcc and arm-oe-linux-gnueabi-g++ and it's the same
From the logs in the bug above I understood the detect was OK with arm-oe-linux-gnueabi-g++ only.
with arm-oe-linux-gnueabi-gcc
sean-mcmanus commentedon Feb 17, 2021
Should be fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.2.1