How to get Xcode 4.1 running under Snow Leopard

snow leopardupgradexcode

I'm trying to upgrade to xcode 4.1, but I it's not working as I expect. I am a registered iOS developer, so I downloaded the (huge) installer. When I double click, it appears to launch, but then it stalls — nothing happens. There's no installer window with buttons to click, etc. I'm sure there's a better way to do the installation from the terminal and see what's really happening. What do I try next?

Also, I'm wondering if anyone has made this work with OSX 10.6.8 yet, as there were some descriptions of the installer crashing on the dev forums. No answers there as of yesterday.

Update: tried so far–
Note: This is the correct version of xcode 4.1 for 10.6 (snow leopard) Not the one from the mac store, which is only for 10.7.

  • I removed the previous version of xcode (was 3.2.5) using /Developer/Library/uninstall-devtools --mode=all.

  • Looking at the syslog, I see a couple of errors that might be causing trouble: Firstly, when I shut down last night it shows Macintosh DirectoryService[11]: BUG in libdispatch: 10K549 - 1960 - 0x10004004. Secondly, this is showing up repeatedly: Macintosh com.apple.launchd[1] (com.apple.SystemStarter): Failed to count the number of files in "/System/Library/StartupItems": No such file or directory

  • When I tried the installer again, the syslog reported the above no such file or directory several times, then Macintosh com.apple.launchd.peruser.501[93] (com.apple.coreservices.uiagent[230]): Job appears to have crashed: Segmentation fault and a crash report.

Perhaps something is corrupted in my /System/Library files that is causing it to choke. Any other ideas on suggestions on how to repair this?

Update 2: I never managed to install xcode 4 on my macBook. The root of the problem seems to be that this was one of the earliest models of macBook to use the Intel processor. And XCode 4 doesn't seem to run well on this processor. Someone may have found a work-around by now, but I ended up with a newer computer: late 2009 MacBook Air running Snow Leopard. No problems with xcode 4 installation.

Crash Report stuff: (hopefully the useful bits…)


Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000281e9000
Crashed Thread:  2

Thread 2 Crashed:
0   libSystem.B.dylib               0x96032401 sha1_block_asm_data_order + 29

Thread 2 crashed with X86 Thread State (32-bit):
  eax: 0xb02258a0  ebx: 0x93e07a69  ecx: 0x281e9000  edx: 0xb4148629
  edi: 0x85121bec  esi: 0xa1f8b822  ebp: 0xd7deffcd  esp: 0xb02257c0
   ss: 0x0000001f  efl: 0x00010286  eip: 0x96032401   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x0000001f   gs: 0x00000037
  cr2: 0x281e9000

Followed by a long list of addresses that all refer to various files in either /System/Library/Frameworks or /usr/lib/. Several of them have ???(???) in the line. 

The last line is: 
`0xffff0000 - 0xffff1fff  libSystem.B.dylib ??? (???) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib`

Best Answer

I'd use Xcode 4.2, as it's the last supported version of Xcode on Snow Leopard. It can still be downloaded from developer.apple.com.