Sonar Scan - Apple Silicon support

We have the below mentioned issue on the Mac Machine with M1 arch when run the sonar-scan.

[Apple Silicon Issue]

I could see there was backlog item on your future list ([https://jira.sonarsource.com/browse/CPP-2882]

Do you have estimate on when it will have support.?

We have many people using Mac M1 machine, All are getting same issue, Due to that people who are using Apple M1 machine could not able to scan the code.

Even our Jenkin Pipeline runs on the Apple M1 machine, Where we could not able to scan it, Due to do that we need do manual scanning process from Old mac machine.

Hi @lakshmanan_ponnusamy ,

we stil don’t have an ETA for Apple Silicon, it is still not easy to have delivery pipeline and CI on Apple Silicon. Thank you for your patience.

Have there been any updates on this? My team’s been using SonarQube for over a year now and I was just upgraded to an Apple M1 Macbook… only to find out that Sonarqube docker image support doesn’t exist. Any updates or ETA would be appreciated, otherwise, My team and I are going to have to drop SonarQube for a different platform.

Hi,

Just want to know is there any ETA on this issue ? In our organization most of us moved to MacBook with M1 , so it’s going to be like, we could not use sonar qube to scan our ios code in very few months, so we may forced to use different platform instead of sonar. We already started looking on the alternative.

Hi @Orrin_Watson and @lakshmanan_ponnusamy ,

our analyzer is already able to run on M1 thanks to rosetta. The component which doesn’t work is the build-wrapper.

As explained in CPP-2882, you can already analyze your code on Apple Silicon through the JSON Compilation Database configuration.

Does that mean you will not be releasing a docker image that works on Apple silicon? That’s really what I’m looking for: a docker image I can use on Apple silicon.

Hi @Orrin_Watson ,

Are you referring to a SonarQube server docker image or to a sonar-scanner docker image?

We are experiencing the same issue with wanting to allow developers to run a local sonarqube server via docker for faster feedback. Rather than waiting for a PR to get analysis for rules and code coverage. Yes, we are using sonarlint in the IDE binding to any projects for faster rule feedback that matches the cloud projects rule settings, but that doesn’t help for code coverage all in one place.

Even with running sonar-scanner against sonarcloud, is there a proper way to be able to specify a branch when running? All scans started locally (even when on a checked out branch) seem to update the “default” branch stats in sonarcloud and not a new branch so it affects metrics that our CI uses for pr’s for releases etc.

This isn’t an issue for any of our engineers using intel chip macs, but there’s no M1 chip sonarqube server docker image from Sonarqube.

A post was split to a new topic: Issue setting up CFamily analysis

Any progress on this? Otherwise, please could you refer me to the documentation on how to set it up with Rosetta on M1 Mac?

Hello @leafyshark and welcome to our community.

A quick summary of the current situation so that you can specify further your ask.

The following is about running an analysis with SonarCloud or SonarQube.

  • To analyze C, C++ and Objective-C code, you need to configure the analysis with the BuildWrapper or with a compilation database. The build wrapper is NOT currently supported on MacOs M1 and a clear error message states so when trying to use it.
  • if you configure your analysis with a compilation database, the analysis will run normally by executing the SonarScanner as Rosetta 2 will allow running the analyzer that we distribute for x86-64 on your M1.

Any update?