Build wrapper generates empty json when SIP enabled on macOS

Hi, I’ve already configured several sonar jobs for C++ and Java projects, but have this very strange behavior trying to setup sonar for swift/objective-c project.

build-wrapper works fine and generates valid JSON when I run it on my macOS from the terminal, but when I run the same commands from GitHub action ( on the same machine) the json is empty.

Another strange thing is when I disable SIP on my macOS, build-wrapper works fine both from the terminal and from github action.

So, as a summary:
If SIP is enabled - build-wrapper works fine if I run it from the terminal and generates empty JSON when I run the same command on the same machine but from GitHub action.
If SIP is disabled - build-wrapper works fine both from the terminal and from the GitHub action

Here I’m attaching build_wrappers log
build_wrapper_bad.log → log generated when running from GitHub action with enabled SIP

build_wrapper_bad.log (298.6 KB)

I cannot disable SIP on my remote github runners so I’m stack at this.

Can anybody help to investigate this issue?

Hi @vahagnv ,

thank you for the log file. Could you provide the “working” build-wrapper.log file for comparison?

I solved the issue by removing CC from environment variables.
Was -

build-wrapper-macos mybuild
     CC: clang


build-wrapper-macos mybuild

I don’t know the root cause of the issue but this worked for me.

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