Template for a good new topic, formatted with Markdown:
ALM used: Bitbucket Cloud
CI system used: Bitbucket pipelines and AWS Linux VM
Scanner command used when applicable: ~/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir /home/ubuntu/.sonar/bw-output ~/ti/ccs1200/ccs/eclipse/ccstudio -noSplash -data /home/ubuntu/workspace-ccs -application com.ti.ccstudio.apps.projectBuild -ccs.projects ccs-project-name -ccs.buildType full
Languages of the repository C
Error observed: “java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty.”
Steps to reproduce: run build-wraper and then sonnar-source
Potential workaround: Do not use ccstudio wrapper and try directly with the compiler
I want to know if there is any way to support ti-cgt-arm compiler. I saw this ticket CPP-2094 which marks as closed the support for armcl compiler. But I do not know if it is supported by SonarCloud.
Also, I reviewed this community and I saw some topics regarding Texas Instruments compilers, someone use the eclipse.exe wrapper and works, others directly calls to gmake and there is also the possibility to dump to compilation database. However, I do not know if it is possible in my case and how.
Thank you for the report, and very thoughtful investigation.
As you mentioned, we are currently supporting armcl compiler, but please note that Texas Instruments recently released a clang-based version of this compiler that uses tiarmclang name for binary, which is not currently supported. Could you please check which version of the Texas Instrument compiler you are using?
For the error itself, it means that the build-wrapper file was properly generated, however, build-wrapper didn’t recognize any of the compiler invcations. This may be caused by multiple reasons, and for the purpose of the investigation, it would be best if you could share logs and JSON files produced by build-wrapper dir (there are /home/ubuntu/.sonar/bw-output in your case). If you think this file contains private information, let us know, and we’ll send you a private message that will allow you to send it privately.
@Javier. I have noticed that you are using the armcl compiler on Linux. This operating system is currently not supported by the Texas Instruments compilers (SonarCloud docs).
This is effect of build-wrapper using a dynamic library loaded with LD_PRELOAD in order to observe compiler calls. That means that cannot observe statically linked binaries, as it is the case of armcl distribution. to work around this you can
have a small bash wrapper with the same name armcl which simply calls the real armcl, this should allow build-wrapper to observe the bash call and fetch the configuration
If above option is not feasible and you can generate a compilation database for your project, you can use it instead of build-wrapper: SonarCloud docs.
I have created CPP-3975 for the purpose of recording this request for supporting such use cases, and tracking any such request in the future.