When the execution machine of the arm64 architecture scans golang, EXECUTION SUCCESS, but all go files fail to be parsed, and on web all files show “Go parser failure".
But on linux x86 and windows, EXECUTION SUCCESS and everything is normal.
what is the problem.
I have a feeling that since there’s an arm64 version of Go, and we directly use Go to parse the language… something hasn’t been adjusted. I’ll flag this for attention.
Is there any update on this, because we are using sonar community version of 9.9 and go version of 1.18 but getting the same error “go parse failure”. Its arm64 arch
Hello @Colin,
We have tried upgrading to the latest to LTS 10.2.1-community, but even after that we are getting the same ERROR messages s below.
ERROR: Unable to parse file: file:///src/app/config/config.go.
ERROR: Cannot parse 'app/config/config.go': Stream closed
ERROR: Unable to parse file: file:///src/app/client/goorange.go.
ERROR: Cannot parse 'app/client/goorange.go': Go parser external process returned non-zero exit value: 126
ERROR: Unable to parse file: file:///src/app/server/http_server_test.go.
ERROR: Cannot parse 'app/server/http_server_test.go': Go parser external process returned non-zero exit value: 126
ERROR: Unable to parse file: file:///src/app/server/sqs_listener.go.
ERROR: Cannot parse 'app/server/sqs_listener.go': Go parser external process returned non-zero exit value: 126
ERROR: Unable to parse file: file:///src/app/client/goorange_test.go.
ERROR: Cannot parse 'app/client/goorange_test.go': Go parser external process returned non-zero exit value: 126
ERROR: Unable to parse file: file:///src/app/main.go.
ERROR: Cannot parse 'app/main.go': Go parser external process returned non-zero exit value: 126
ERROR: Unable to parse file: file:///src/app/server/http_server.go.
ERROR: Cannot parse 'app/server/http_server.go': Go parser external process returned non-zero exit value: 126
ERROR: Unable to parse file: file:///src/app/infra/logger.go.
ERROR: Cannot parse 'app/infra/logger.go': Go parser external process returned non-zero exit value: 126
Our Go analyzer does currently not support Linux ARM64. Only MacOS ARM64 is supported, which was added by the ticket linked by @Colin (SONARSLANG-589).
Support for Linux ARM64 can also be added in a similar way, I created a ticket SONARSLANG-639 for that.
The reason why it’s not working ootb is that not the Go parser available on the build machine (if any) is used by our Go analyzer, but the binaries for the Go parser are shipped with the Jar of the analyzer. Currently supported platforms are:
I am still facing this issue as well on 10.5.1-community. The funny history is that the scan is fixed for Mac M1, and the solution seems to be very similar to Linux. There is no news here about the fix. What is missing to you guys apply the fix to ARM Linux?