Does MacPorts need ALL of Xcode?

Ian Wadham at
Sun Oct 3 05:08:11 UTC 2021

> On 2 Oct 2021, at 6:20 pm, Ryan Schmidt <ryandesign at> wrote:
> On Sep 27, 2021, at 16:36, Ian Wadham wrote:
>> So what is the “recipe” to install just the CLT with no version of Xcode present? And can that recipe be included in the MacPorts Guide?
> Run
> xcode-select --install
> and click the button to install the command line tools.
> Or download the command line tools installer from the Apple Developer Downloads web site.

OK, thanks Ryan, but how about ?

It explicitly says to install Xcode first, as a dependency of MacPorts, and then do xcode-select —install, which is what I have been doing for 10 years or more as a MacPorts user. And I suppose almost all other MacPorts users have too.

But in that time Xcode has grown from a gigabyte or two to 20 Gb on my current MacOS, Catalina 10.15.7. That is a significant slice of the SSD storage in a shop-standard MacBook Pro. So if a user does not need Xcode as a prerequisite of MacPorts, he/she should not have to carry the time and space overheads of downloading, installing and storing it.

My question then is please can be re-written to help users who do not need Xcode for any other reason?

>> Couldn’t those ports list Xcode as a build dependency?
> They do, by using this keyword:
> use_xcode yes

Chris Jones raised the point on 26/27 September on this thread that some ports require Xcode and gave this as the reason for MacPorts requiring Xcode.

But how many ports are involved here? What percentage of users are likely to need them? And what is the worst that can happen to a user if he/she happens to run into one and does not have Xcode installed?

I tried port search use_xcode to try and shed some light on these questions, but it gave "no match … found”.

Ian Waham.

More information about the macports-users mailing list