Starting with Xcode 4.3, Apple has stopped linking command-line tools as standard with Xcode.
These problems are caused by Xcode trying to use different compilers for Device (armv6 and armv7) and Simulator (i386).
In the build phase of the script for armv6 and armv7, Xcode will use related tools (in the issue of compiling cc (clang)). But to build a simulator, building phase scripts uses system versions.
If you have not explicitly installed the tools, the assembly will fail.
To install the tools, select Xcode > Preferences > Downloads

And click Install for Command Line Tools.
source share