Apple Silicon Issue

  • SonarScanner 4.5.0.2216
  • Scan my project as usual in the Jenkins pipeline
  • Migrated to M1 Mac Mini

After a successful build using build-wrapper-macosx-x86, sonar-scanner fails with this error:

INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 12.161s
INFO: Final Memory: 40M/144M
INFO: ------------------------------------------------------------------------
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.execute(CFamilySensor.java:431)
    at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:45)
    at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
    at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
    at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:68)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
    at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:444)
    at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:440)
    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:398)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
    at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:126)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
    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(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    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)
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

I have browser the docs, forums and issue and I haven’t been able to find any mention of Apple Silicon. Would you be able to help?

Hello @Alessandro_Martin ,

Welcome to SonarSource Community! :wave:

The logs show the things to check. Which version of SonarQube are you using? Can you please show the following?

  • build-wrapper-dump.json
  • build-wrapper.log
  • the 2 sets of commands you used: one for the build-wrapper and one for the sonar-scanner

If you prefer, please message me privately (click on my avatar and click on “Message”).

Joe

Hi Joe, thank you so much for the quick response.
I don’t see the option to message you privately though, neither from Safari nor from Opera.

I messaged you privately. My apologies, here’s how to do it next time:

No worries, thank you!

@Alessandro_Martin : Thank you for your patience. Apple Silicon is not a compatible/supported platform for C-family analysis, based on our documentation: https://sonarcloud.io/documentation/analysis/languages/cfamily/

  • macOS with version 10.14.3 and later on x86-64

Please try your analysis on a supported platform. We do have future plans to support Apple Silicon, see here: https://jira.sonarsource.com/browse/CPP-2882

Thanks for the help, @Godin !

Joe

Thank you @Joe and @Godin.
Fingers crossed that this issue is resolved soon.

1 Like

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