0

I am trying to update my app to work with the iPhone5, which entails ensuring that it is compiled for armv7 and armv7s architectures. I have updating my build settings in my project and have recompiled all statically linked libraries with these settings as well. So it now compiles and links successfully.

However, upon running it on a device (iPad) running iOS6 (though of course only supporting the armv7 architecture) I get an immediate crash with this output:

dyld: vm_protect(0x00001000, 0x003BB000, false, 0x07) failed, result=2 for segment __TEXT in /var/mobile/Applications/....[name/location of my app]....

I also get this in the trace window:

dyld`dyld_fatal_error:
0x2fe400c4:  trap   
0x2fe400c8:  nop  

I have no iPhone5 to test the armv7s portion of the binary. Of course I will test it on a real device before releasing into the wild, but I'd like to be able to continue work using my current armv7 iPad/iPhone running iOS6 in the meantime. I am using the recently released Xcode 4.5.

So, anyone have any idea what is going on, or possibly have the same problem?

s-v
  • 153
  • 1
  • 7

2 Answers2

0

Redownloading and subsequently recompiling one of the libraries I was including fixed the problem. Apparently either I had changed something incorrectly in the build configuration for the library when adding the armv7s architecture, or some part of the library's project became corrupted somehow. (The affected library was the Freetype2 library as included with the FTGLES2 Xcode project.)

s-v
  • 153
  • 1
  • 7
0

You probably accidentally disabled dynamic linking when you statically recompiled the libraries (resulting in a -static flag being passed to clang when compiling).

Fix by switching "Enable linking with shared libraries" to "Yes" (the default) in the LLVM compiler language settings. (This removes GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO from the project file).

Alex North
  • 1,189
  • 13
  • 12