Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Convert to ARC, Create universal binary fails with error of "can't figure out the architecture type of"

I'm attempting to convert an iOS (pure Objective-C) project to ARC. The conversion fails at the octest target CreateUniversalBinary stage with the following error. The project and target architecture build settings look correct to me so I am struggling to understand why this is failing:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't figure out the architecture type of: /Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Intermediates/Make-Up Kit.build/Debug-iphoneos/Make-Up KitTests.build/Objects-normal/armv7/Make-Up KitTests Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo failed with exit code 1

The aforementioned CreateUniversalBinary command is as follows:

CreateUniversalBinary "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Products/Debug-iphoneos/Make-Up KitTests.octest/Make-Up KitTests" normal "armv7 armv7s" cd "/Users/andybowskill/Development/iOS/Make-Up Kit" setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" lipo -create "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Intermediates/Make-Up Kit.build/Debug-iphoneos/Make-Up KitTests.build/Objects-normal/armv7/Make-Up KitTests" "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Intermediates/Make-Up Kit.build/Debug-iphoneos/Make-Up KitTests.build/Objects-normal/armv7s/Make-Up KitTests" -output "/Users/andybowskill/Library/Developer/Xcode/DerivedData/Make-Up_Kit-axtbxqtkmnlfmlcafkoetwqmeufc/Build/Products/Debug-iphoneos/Make-Up KitTests.octest/Make-Up KitTests"

Please could someone help to explain the error? Many thanks in advance!

like image 512
Andy Bowskill Avatar asked Jan 09 '13 21:01

Andy Bowskill


3 Answers

Removing "armv7" from "Valid Architectures" in the Target (leaving only "armv7s") solved this for me. My iOS Deployment Target is 4.3.

Adding "armv6" to "Valid Architectures" in the Target and updating my iOS Deployment Target to 6.1 did not work.

Encountered while converting to Objective-C ARC in XCode Version 4.6 (4H127)

like image 53
Ralfonso Avatar answered Nov 04 '22 12:11

Ralfonso


I trawled my project build settings again and noticed that I had removed armv6 architecture support but still had the deployment target set to an iOS version less than 4.3. Updating the deployment target to iOS 4.3 or above resolved the problem.

like image 3
Andy Bowskill Avatar answered Nov 04 '22 14:11

Andy Bowskill


I also encountered same problem while migrating to ARC from NON-ARC. and after digging and banging head I come to know 2 solutions

  1. Add armv6 in valid arch's in target, OR
  2. Set build Active Arch. only to NO.
like image 3
TheGhost Avatar answered Nov 04 '22 13:11

TheGhost