I am getting an error after upgrading to xcode 4, for all of the library projects that my application depends on.
[BEROR]No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv6).
Unset Valid Architectures To remove this setting from a target, use the Delete key to remove it. Once VALID_ARCHS is no longer set for a target, it will disappear from the User-Defined build setting group. Ensure you completely remove VALID_ARCHS by using the Delete key.
VALID_ARCHS (Valid Architectures) Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on.
a library doesn't contain the x86_64 architecture (You can run lipo -info /path/to/your/lib. a to verify it). If you don't have the source code of the library, you have to modify your own project. In the build settings, change the valid architectures to armv7 and i386 , or change Architectures to armv7 only.
The "build active architecture only" setting causes everything except the current Mac's architecture to be ignored (and the current one is of course valid), hiding the problem. Instead, you should look up a row or two in the settings, and change the "Architectures" setting to "Standard".
It looks like all you have to do is add i386 to the Valid Architectures in the build settings. I was compiling for the simulator, and that's why it was complaining.
This seems odd, because the project worked just fine before upgrade. It looks to me like you have to do this for any project you upgrade. At least that will work for now.
See https://devforums.apple.com/message/376732#376732
"No architectures to compile for" means "Valid Architectures" field is empty. Update it to
$(ARCHS_STANDARD_32_BIT)
and you'll see the usual armv6 armv7. This happens sometimes in XCode 4 GM after updating "Base SDK" to "Latest SDK".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With