Build wrapper is not working as expected, Objective C, XCode

Hi guys,
Please I need your help to figure out why the build wrapper tool is not working as expected when running the command to build an Ios - Objective C on a Mac (Intel x86 Architecture).

The build command alone is working fine.
xcodebuild clean build -workspace PagaloTodo.xcworkspace -Scheme PagaloTodo

But when running with the build wrapper command:

build-wrapper-macos-x86 --out-dir bw-output xcodebuild clean build -workspace PagaloTodo.xcworkspace -Scheme PagaloTodo

Two files are created inside bw-output folder but the dump json file does not seem complete, also the command execution was too fast and that is unusual. I Attached the build wrapper logs and dump file
build-wrapper-dump.json (507 Bytes)
build-wrapper.log (3.8 KB)

1 Like

Hey there.

Based on the logs, your xcodebuild command is returning a non-zero exit code.

Tue Dec 20 15:34:49 2022: returned with code: 1

Is the build behaving as expected (and succeeding) without the build wrapper in play?

Hi Colin,

Yes, the build command alone is working as expected.

Initially, I had used this command:
xcodebuild clean build -workspace PagaloTodo.xcworkspace -Scheme PagaloTodo
and the build is successful.

I had tried passing others configuration options as arch, sdk, BUILD_LIBRARIES_FOR_DISTRIBUTION where
also the build is successful but the build wrapper generated file is uncomplete.

Hi @Stalin_Vladimir_Gome ,

looking at your build-wrapper.log it seems that you are on macOS Ventura 13.1. Unfortunately, build-wrapper currently doesn’t support macOS 13, see the related ticket: [CPP-3987] - Jira.

You can use the JSON Compilation Database instead. To generate a Compilation Database:

  • if you are using CMake, set the CMAKE_EXPORT_COMPILE_COMMANDS option
  • if you are using Xcode, use xcpretty

It have been half year, is there any update on the wrapper?

Hi @hudson ,

we recently added support for macOS Ventura: [CPP-3987] - Jira. It is going to be released in the next SonarQube version 10.2 and will be available soon on SonarCloud.

Is that possible to use the latest wrapper in Sonarqube LTS (9.9.1)?

Hi @hudson ,

no, it is not possible and it is unlikely that we are going to backport this feature to the LTS version.

However, you could test if the new feature works fine for you, the new build-wrapper is already on sonarcloud:

does build-wrapper support for macOS 14.2.1 (Sonoma)?
I’ve faced the same issue as the topic starter.

Did you solve the issue? I still get the empty result:

# (C) SonarSource SA, 2014-2023,
# All SONARSOURCE programs and content are copyright protected.
# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.
# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.
# It may not be used in connection with any other software.
# Any other use is prohibited by law and may be grounds for immediate termination of your License.

My Mac OS is 14.0

Did you solve the issue? I get the same empty result with MACOS 14.4