Fail to use scanner on IAR project

Hi there,

I try to scan one of our project to evaluate the Sonar C scanner. I have an evaluation licence for the Developper edition to do so.

The project is build using IAR for ARM (8.32.4).
The build is done from command line though the build wrapper.
The compilation database it well populated.

But then, I run the scanner to do the analysis stuff but it fails with the following error:

10:58:51.860 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: unexpanded response file
	at com.sonar.cpp.analyzer.IarDriver.onCapture(IarDriver.java:92)
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:326)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:212)
	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)

There is no preceding error, only some warnings for encoding issue in some files.

I can share the full log in PM if needed.

Any clue ?

Hi @delijo,

would you be able to share the build-wrapper output folder?

If you prefer to do it privately I can send you a PM.

Hi @mpaladin,
Thanks for your reply.
I prefer to send in PM

Hi @delijo,

thank you for your collaboration. The issue is coming from build-wrapper not being able to expand some response files during build, it may due to antivirus blocking it or similar.

Considering this topic as closed for the time being.

A post was split to a new topic: IAR compiler and IllegalStateException: unexpanded response file