Apple silicon support (arm64) for sonar-scanner

I have found several threads about this last year but I haven’t been able to find any recent updates on the support for running the scanner on MacOS using arm64 architecture (Apple’s new silicon). Note, I want to make a clear distinction here: I am interested in sonar-scanner support (client side), not SQ or SC support (service side). I would love to get an update whether this is on a roadmap and if so, what is a an ETA on this. As far as why this is important, there are several reason for my company’s environment, and there may be more:

  • Apple has made a shift last year to arm64 architecture and we’ll likely see many years of new hardware that will be running on these chips. My company started to issue new laptops to developers using arm64 (this is what is available from Apple) while we’re trying to support local development and testing using Sonar. This is now a problem as new devs with new hardware cannot do simple things like running a scan locally against their branch or test changes to our CI environment. We’re using SonarCloud and SonarQube on x86 so service side NOT an issue. The new clients on MacOS are the problem and we’re currently left with trying to solve this on our own.

  • For CI integration, AWS offers siginficant discounts, ~40%, for using arm64 nodes. That’s a lot of money. We’re currently evaluating this environment and our current pipelines can move, as is, to arm64 with one wrinkle: sonar-scanner. Note, we’re scanning swift right now so build-wrapper is not a requirement. But, it is likely we will be introducing C++ so build wrapper or build database will be an issue at some point. I suspect we’re not the only customer confronted with this issue.

I found some references to using Rosetta2 to work around this, I haven’t evaluated this, and I haven’t seen posts where folks reported success so either it doesn’t work or it does and no one is sharing the info :smile: It would be very helpful to see a definitive guide from Sonar for how to do this. Please consider updating your docs or making this guide available so at least we can evaluate the workaround in our environment and proceed from there. Thanks!

2 Likes