Xcode, GCC, and Homebrew
Open source is incredible.
Several months ago, I got fed up with having to download Xcode to build my software. I took the Xcode installer, ripped out all of the parts I didnāt need, and made a nice installer for GCC. It ended up being \~200MB in size. It took 2 minutes to download.
OSX-GCC-Installer was born. Perfect.
Unfortunately, I couldnāt include the 10.6/7 SDKs due to licensing restrictions. These SDKs include CoreAudio, CoreData, OpenGL, and more. Most software that isnāt build specifically for OSX would build perfectly. Unfortunately, some software added some needless system dependencies, though (Iām looking at you, Node).
I stuck it up on GitHub, and much to my delight, it became a pretty big hit. It solved a lot of headaches for a lot of people.
Today, the project has 1649 watchers on GitHub and has been downloaded 53,400 times. Thatās 13.7 Terabytes of transfer. Thanks, GitHub, for the generous hosting.
Homebrew did their best to support the project, but the official stance was āif you buy a Mac, you buy the whole packageā, pointing everyone to install full Xcode if they had any problems. Far from ideal, but I was content.
## Appleās Interest
Meanwhile, Apple reached out to me to discuss some details about OSX-GCC-Installer. They took an interest in shipping something official, but they werenāt sure of the proper approach to take to support projects like Homebrew.
I hopped on the phone, explained the specific needs of Homebrew, the restrictions with the proprietary headers and licensing, and what the ideal situation would be.
Months passed and I didnāt hear anything. Until today.
## Command Line Tools for Xcode
Today, Apple added a beautiful new package to their official developer tools suite:Command Line Tools for Xcode. Itās a 171 MB download that includes all of the tools a Homebrew should ever need. Best of all, it contains the proprietary headers that I couldnāt ship myself.
You can download and try it out today. All you need is a free Apple ID.
Youāll want to uninstall Xcode first:
$ sudo /Developer/Library/uninstall-devtools āmode=all
Major props to Apple for making this happen.
## The Future
This is an incredible day for the Homebrew community. You can now setup a complete OS X develop environment with a single 171.7 MB package download. Itās official. Itās legal. Itāll be maintained.
Homebrew is going to officially support the package too.
Max Howell:
To stave off further questions, yes, you can use the āCommand Line Tools for Xcodeā package with Homebrew. And we will support it.
Mike McQuaid:
We will recommend you donāt use Xcode from the App Store but instead the command-line-tools package (which can also be installed from inside of Xcode and lives happily alongside it).
Open source is incredible.