Invalid probe found - QNX Compiler

  • Versions used:
    SonarQube: 8.1.0.31237
    Scanner: 4.5.0.2216
    Compiler: QNX 6.6
    Operating System: windows version: 6.1, service pack: 1.0, build number: 7601, product type: 1

  • Error observed:
    Extract from build-wrapper.log:

Tue Feb 09 13:44:20 2021: command line: <C:/qnx660/host/win32/x86/usr/bin/qcc -Vgcc_ntoarmv7 -c -Os -Wc,-Wall -DNDEBUG -I. -IE:/SomeProject/Software/include -EL -DVARIANT_le -DVARIANT_v7 -DBUILDENV_qss E:/SomeProject/Software/SomeFile.c>
Tue Feb 09 13:44:20 2021: working directory: <E:\SomeProject\Software\arm\o-le-v7\>
Tue Feb 09 13:44:20 2021: isWow64: 1
Tue Feb 09 13:44:20 2021: Probing C compiler: C:\qnx660\host\win32\x86\usr\bin\qcc.exe
Tue Feb 09 13:44:20 2021: exit code: 1 (0x1)
Tue Feb 09 13:44:20 2021: stdout:

Tue Feb 09 13:44:20 2021: stderr:
cc: looking for gcc_ntox86 in C:/qnx660/host/win32/x86/etc/qcc/gcc/4.7.3/gcc_ntox86++.conf

cc: looking for gcc_ntox86 in C:/qnx660/host/win32/x86/etc/qcc/gcc/4.7.3/gcc_ntox86.conf

cc: unknown option: '-dM'


Tue Feb 09 13:44:20 2021: Probing C++ compiler: C:\qnx660\host\win32\x86\usr\bin\qcc.exe
Tue Feb 09 13:44:20 2021: exit code: 1 (0x1)
Tue Feb 09 13:44:20 2021: stdout:

Tue Feb 09 13:44:20 2021: stderr:
cc: looking for gcc_ntox86 in C:/qnx660/host/win32/x86/etc/qcc/gcc/4.7.3/gcc_ntox86++.conf

cc: looking for gcc_ntox86 in C:/qnx660/host/win32/x86/etc/qcc/gcc/4.7.3/gcc_ntox86.conf

cc: unknown option: '-dM'

Scanner partial output:

14:21:01.357 WARN: Invalid probe found, skip analysis of files: [E:/SomeProject/SomeFile.c]
The compiler probe 'stdout' is expected to contain at least one '#define' directive:

14:21:01.386 INFO: Subprocess(es) done in 274ms
14:21:01.389 INFO: 0 compilation units analyzed
14:21:01.459 INFO: ------------------------------------------------------------------------
14:21:01.462 INFO: EXECUTION FAILURE
14:21:01.465 INFO: ------------------------------------------------------------------------
14:21:01.467 INFO: Total time: 19.175s
14:21:01.539 INFO: Final Memory: 22M/95M
14:21:01.542 INFO: ------------------------------------------------------------------------
14:21:01.545 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
  * you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  * you are correctly invoking the scanner with correct configuration
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * you are providing the path to the correct build-wrapper output directory
  * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:357)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
        at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$Proxy0.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
  • Questions:
    As I understand from the build-wrapper.log, the desired QNX target is gcc_ntoarmv7 with variants v7 and le. However, it seems that the compiler probe is looking for settings for a gcc_ntox86 target. There is also a complaint that -dM is an unknown option. I cannot see where this option is being used at all.
    Can someone please help me with this problem?

Hey there.

QNX compilers became supported in SonarQube 8.4

1 Like

Hi Colin

Thank you so much for your reply. I will upgrade our SonarQube instance and try again.

Best regards
Leanne.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.