1

For the purposes of automated testing, I'm looking to build an XCode project file from the command line on a headless Mac (which I believe is running Monterey). The machine I'm hoping to build things on has only the Command Line Tools Package installed, without a full XCode installation. (For various technical reasons, the sysadmin in charge does not want to install the full XCode.) The process I'm attempting to use has worked previously on other Macs (albeit ones with full XCode installs).

The issue I'm running into is that using xcodebuild to launch the build of the .xcodeproj file is failing with the error message:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

The apple technical note "Building from the Command Line with Xcode FAQ" seems to imply that using the xcodebuild command should be possible with the Command Line Tools Package. However, in searching for the above error message, most of the advice on fixing it seems to boil down to "install the full XCode, then point xcode-select to that install".

Is it possible to use xcodebuild with just the Command Line Tools Package, or is this something that needs a full XCode install? If xcodebuild does need a full XCode installation, what is the recommended way of building .xcodeproj files with just the Command Line Tools Package?

P.S. It seems like a large number of the pages on the internet related to the above error message are Node.js related. For my issue, Node.js is not involved in any way. We are invoking xcodebuild directly for compilation of a strictly C++ project.

0

You must log in to answer this question.

Browse other questions tagged .