Skip to content
adamv edited this page Jan 16, 2012 · 54 revisions

Supported XCode Versions

OS X Version XCode Versions
10.5 3.1.4
10.6 3.2.x (3.2.6 preferred), 4.x
10.7 4.1, 4.2

Note that using an XCode older than 4.1 on 10.7 may cause build errors.

For those who don’t want to install the whole of Xcode, the Xcode DMG actually contains many many individual .pkg installers. This is Xcode 4 preview 5 iOS DMG:

ApplicationLoader.pkg
BluetoothSDK.pkg
CoreAudioSDK.pkg
Dashcode.pkg
DevDocumentation.pkg
DevSDK.pkg
DevSamples.pkg
DevToolsDocumentation.pkg
DeveloperDiskImage4_2.pkg
DeveloperDiskImageReleased.pkg
DeveloperTools.pkg
DeveloperToolsCLI.pkg
DeveloperToolsSystemSupport.pkg
DistributedBuildsSupport.pkg
DocDownloadOff.pkg
DocDownloadOn.pkg
FireWireSDK.pkg
Git.pkg
JavaSDK.pkg
MacOSX10.5.pkg
MacOSX10.6.pkg
MobileDevice.pkg
OpenGLApps.pkg
OpenGLSDK.pkg
OtherDevDocumentation.pkg
QuickTimeSDK.pkg
RelocatableScript.pkg
SystemScript.pkg
VersionedDeveloperToolsSystemSupport.pkg
WebKitSDK.pkg
X11Documentation.pkg
X11SDK.pkg
XcodeTools.pkg
Xcode_MacOSX10.6_Extras.pkg
Xcode_System_Tools_MacOSX10.6_Extras.pkg
XcodeiPhonePlugins.pkg
clang.pkg
gcc4.2.pkg
gcc4.2ADCDocs.pkg
iPhoneDocumentation.pkg
iPhoneHostSideTools.pkg
iPhoneSDK3_0.pkg
iPhoneSDK3_1.pkg
iPhoneSDK3_1_2.pkg
iPhoneSDK3_1_3.pkg
iPhoneSDK3_2.pkg
iPhoneSDK4_0.pkg
iPhoneSDK4_1.pkg
iPhoneSDK4_2.pkg
iPhoneSDKSnowLeopardExtras.pkg
iPhoneSDKTools.pkg
iPhoneSimulatorSDK3_2.pkg
iPhoneSimulatorSDK4_0.pkg
iPhoneSimulatorSDK4_1.pkg
iPhoneSimulatorSDK4_2.pkg
iPhoneSimulatorSDKTools.pkg
iPhoneSystemComponents.pkg
llvm-gcc4.2.pkg
xcrun.pkg
  1. HELP WANTED

Which ones of those does Homebrew actually need? Someone needs to figure that out.

Here’s my initial (untested) guess:

DeveloperTools.pkg
DeveloperToolsCLI.pkg
DeveloperToolsSystemSupport.pkg
JavaSDK.pkg
OpenGLSDK.pkg
X11SDK.pkg
clang.pkg
gcc4.2.pkg
llvm-gcc4.2.pkg

Update by cr0t (testing results):

Additionally to packages listed above I had to install staff listed below:

DevSDK.pkg     # contains crt1.10.5.o and crt1.10.6.o which is needed for C compiler
MacOSX10.6.pkg # without this package
MacOSX10.7.pkg # and this it also can be worked, but I've installed them when searching for crt library

After that I tested my cutted XCode installation on nmap homebrew formula:

bender:bin $ brew remove nmap
Uninstalling /usr/local/Cellar/nmap/5.51...
bender:bin $ brew install nmap
Warning: Xcode is not installed! Builds may fail!
==> Downloading http://nmap.org/dist/nmap-5.51.tar.bz2
File already downloaded in /Users/cr0t/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/nmap/5.51 --without-zenmap
==> make
==> make install
/usr/local/Cellar/nmap/5.51: 283 files, 13M, built in 2.9 minutes
bender:bin $ which nmap
/usr/local/bin/nmap
bender:bin $ nmap -v

Starting Nmap 5.51 ( http://nmap.org ) at 2011-08-10 17:41 VOLST
Read data files from: /usr/local/Cellar/nmap/5.51/share/nmap
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.06 seconds

It compiled and installed successfully.

GCC/LLVM Version Database

Xcode GCC 4.0 GCC 4.2 LLVM-GCC 4.2 LLVM Clang
2.5.0 5370
3.1.4 5493 5577 5555 2064.3
3.2.0 5493 5646 5646 2118
3.2.1 5493 5646 (dot 1) 5646 2206
3.2.2 5493 5659 5646 2207.5 1.0.2
3.2.3 5494 5664 5658 2326.10 1.5 (60)
3.2.4 5494 5664 5658 2326.10 1.5 (60)
3.2.5 5494 5664 5658 2333.4 1.6 (70)
3.2.6 5494 5666 (dot 3) 5658 2335.6 1.7 (77) (based on LLVM 2.9svn)
4.0.0 5494 5666 5658 2335.9 2.0 (137) (based on LLVM 2.9svn)
4.0.2 5494 5666 5658 2335.9 2.0 (137) (based on LLVM 2.9svn)
4.1.0 5666 5658 2335.15.00 2.1 (163.7.1) (based on LLVM 3.0svn)
4.2.0 5658 2336.1.00 3.0 (211.10.1) (based on LLVM 3.0svn)
4.3.0
Clone this wiki locally