> MacPorts lipo (it works, put it earlier on your path because hotspot build 
> references "lipo" with no fancy variables)

The lipo problem is freaking annoying. The issue is Xcode 4 doesn't have it in 
the OSX toolchain, it installed the actual binary to /usr/bin/lipo. In Xcode 5 
that was replaced by a stub binary that forks xcrun to find the actual tool 
which is now located in the Xcode Developer directory. There's a bug in the 
stub tool that prevents it from exiting cleanly when it can't find the actual 
tool, so it goes into an infinite loop of calling xcrun to find the tool and 
failing. Incidentally, you can apply one of the fixes below, then call "xcrun 
-k lipo" and if you have lipo looping infinitely in another terminal it will 
suddenly start working.

Unfortunately I think it's the one thing that may require manual intervention 
(once I get my backport of 8043340 done, which will be soon..), there's just no 
way around this until Apple fixes their bug.

There's three solutions to this that I don't think are too ugly:
1> Install cctools in MacPorts, though this leaves the broken /usr/bin/lipo 
version around to break things in the future
2> Xcode 4 has lipo in the iOS Platform Developer directory, make the following 
symlink (or copy the executable):
lrwxr-xr-x  1 daved  admin  56 Jan  7 12:43 
/path/to/Xcode4.app/Contents/Developer/usr/bin/lipo -> 
../../Platforms/iPhoneOS.platform/Developer/usr/bin/lipo
3> Copy Xcode 5's version of lipo to /usr/bin, or you could even copy it to 
Xcode4.app/Contents/Developer/usr/bin/lipo

Option 2 is probably the most future-proof as it allows the use of xcode-select 
to choose Xcode 4, even after copying to a different system (it's also 
scriptable!).

I'm playing around with detecting if lipo is broken, if I can detect it 
reliably I can change the path to use the iOS version instead (which is the 
same executable..). If that can be done then none of the above will be 
necessary. Unfortunately detecting if something hangs indefinitely (in a 
*clean* and reliable way) from a shell script is not trivial. I may have to 
resort to a perl one-liner.


IMHO, the best solution would be to remove the use of lipo entirely, since we 
don't and likely will never actually support universal binaries on Mac.

-DrD-

Reply via email to