Question

I just upgraded from Xcode 4 to Xcode 4.2 and now I'm getting the following error when building for the Simulator:

ld: in /Users/rstaicut/Library/Developer/Xcode/DerivedData/iphone/Build/Intermediates/iphone.build/QA Server-iphonesimulator/Project iPhone Debug.build/Objects-normal/i386/CartController.o, could not parse object file 

/Users/rstaicut/Library/Developer/Xcode/DerivedData/iphone/Build/Intermediates/iphone.build/QA Server-iphonesimulator/Project iPhone Debug.build/Objects-normal/i386/CartController.o: 

**Malformed metadata record for architecture i386**
**Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1**

One thing to note is that I've changed the compiler to LLVM GCC 4.2 for this upgrade and I'm using armv6 and armv7 for the architectures. I'm only getting this error for the Simulator, the build finishes for the device.

Any ideas what malformed metadata record could mean?

Was it helpful?

Solution

Got the simulator to finally work. These are the things I changed:

  • Under Project > Build Settings > Architectures > Valid Architectures I took out i386 and left only armv6 and armv7. Under architectures I only have armv6 and armv7

  • I changed the Compiler from LLVM GCC 4.2 to Apple LLVM compiler 3.0 (Under Project > Build Settings > Build Options > Compiler for C/C++/Objective-C

  • Changed the iOS Deployment target from iOS 3.1 to iOS 4.0

  • The last step was to press on "Validate settings" (the button in the middle on the bottom). It's going to ask you to change some settings for the compiler from LLVM GCC to Apple LLVM Compiler 3.0. Hit OK.

My simulator started magically working after that. No errors, though plenty of warnings due to the change in compiler.

Hope this helps anyone else who runs into this issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top