xcrun/lipo freezes with OS X Mavericks and XCode 4.x xcrun/lipo freezes with OS X Mavericks and XCode 4.x python python

xcrun/lipo freezes with OS X Mavericks and XCode 4.x


A more appropriate fix is:

ln /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipoxcrun -k lipo

Why: xfx's fix will likely break being able to use xcode-select to choose your toolchain in future versions of Xcode.

Pre- Mavericks and Xcode 5.x, /usr/bin/lipo seems to be the actual location of the actual lipo tool (try cat /usr/bin/lipo - looks like a big binary). In Mavericks / Xcode 5.x, lipo was moved to XcodeDefault.xctoolchain, and the binary at /usr/bin/lipo is a thin wrapper that appears to just call xcrun lipo (see nm /usr/bin/lipo), which in turn finds the location of lipo based on xcode-select.

Probably, new versions of xcode-select and/or Mavericks replace /usr/bin/lipo with the wrapper version. If you then try to use lipo with the 4.x toolchain xcode-select'd, it won't work, since the tool isn't contained in older versions of Xcode. Luckily, it's still included in iPhoneOS.platform for some reason, else you'd probably have to pull it from an uncorrupted <=10.8 machine.

It looks as if there was a lot of shuffling of tools between Developer/usr/bin and Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin in the 4->5 switch - it wouldn't surprise me if there were similar problems with other less-often-used command line tools as well.

Finally, the fact that xcrun hangs when it can't find a tool seems like an apple bug, plain and simple.


This one works for me:

xcode-select -–installsudo mv /usr/bin/lipo /usr/bin/lipo.origsudo ln -s /Library/Developer/CommandLineTools/usr/bin/lipo /usr/bin


I got the same problem, fixed by replace the /usr/bin/lipo with an old one from Max OS 10.7.

Update:replace /usr/bin/lipo with /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin will work. You need Xcode application or img file.