The "build-wrapper-dump.json" file was found empty for Objective-C

I executed the following commands on Terminal

build-wrapper-macosx-x86 --out-dir bw-output xcodebuild -workspace Speedbiz.xcworkspace -scheme Speedbiz clean build

It resulted in

BUILD SUCCEEDED

When I execute the sonar-scanner to run the scan , it throws following error

ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty. Please make sure that:
-you are using the latest version of the build-wrapper and the CFamily analyzer
-your compiler is supported
-you are wrapping your build correctly
-you are wrapping a full/clean build
-if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:442)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:175)
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:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:392)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:388)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:357)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:150)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
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)

My sonar properties file

sonar.projectKey=speedbiz-ios
sonar.sources=.
sonar.cfamily.build-wrapper-output=bw-output
sonar.host.url=http://localhost:9000
sonar.login=0e8eca1f86d3c64b5caccea1b7f00cb2daf70ae8

I’ve downloaded the latest version of Sonar Build-wrapper (version 6.20 macosx-x86)

http://localhost:9000/static/cpp/build-wrapper-macosx-x86.zip
SonarQube Version: 8.9.1 LTS Developer
SonarScanner 4.6.2.2472
Java 11.0.11 AdoptOpenJDK (64-bit)
Mac OS X 11.4 x86_64

How to solve this problem?
build-wrapper-dump.json (507 Bytes)
build-wrapper.log (3.2 KB)

Hi @GRV ,

are you running on M1 mac? FYI, we still don’t support M1 machines, see CPP-2882.

Hi @mpaladin,
is this still not supported for M1 chip mac?

Hi @Ahmad_Berro ,

still not supported.

As described in CPP-2882:

Workaround

Use JSON Compilation Database to configure the analysis, look at Analysis Steps Using Compilation Database section https://docs.sonarqube.org/latest/analysis/languages/cfamily/.