Although this issue was already commented in http://forum.openframeworks.cc/t/freetype-linking-error-w-0.062,-xcode-3.2.6,-ios4.3-device/5734/15
a new topic may be opened for this issue.
I’m now about to release a new app version and I received an email form the AppStore Team that I may consider to build with Position Independent Executable enabled.
We have discovered one or more issues with your recent delivery for “TOnOa Music”. Your delivery was successful, but you may wish to correct the following issues in your next delivery:
Non-PIE Binary - The executable ‘TOnOa.app’ is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.
If you would like to update your binary for this app, you can reject this binary from the Binary Details page in iTunes Connect. Note that rejecting your binary will remove your app from the review queue and the review process will start over from the beginning when you resubmit your binary.
If I understood well this is only an advice and the delivery was successful. But since i didn’t receive such a notification 1 month ago when I first launched the app, I guess in the future the AppStore Team could become more strict with this issue, since it is one important feature for code security together with sandboxing and code-singning.
Although I have all ‘Don’t Create Position Independent Executable’ flags checked to NO everywhere in build settings and even forced with LD_NO_PIE = NO in the *.xcconfig file, the PIE configuration get disabled in both debugging against the device and compiling the release binary.
ld: warning: ld: warning: ignoring file …/…/…/libs/glew/lib/osx/glew.a, file was built for archive which is not the architecture being linked (armv7): …/…/…/libs/glew/lib/osx/glew.aignoring file …/…/…/libs/FreeImage/lib/osx/freeimage.a, missing required architecture armv7 in file …/…/…/libs/FreeImage/lib/osx/freeimage.a (1 slices)
ld: warning: ignoring file …/…/…/libs/glu/lib/ios/glu.a, file was built for archive which is not the architecture being linked (armv7): …/…/…/libs/glu/lib/ios/glu.a
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _FreeImage_GetMetadata from …/…/…/libs/FreeImage/lib/ios/freeimage.a(BitmapAccess.o-arm). To fix this warning, don’t compile with -mdynamic-no-pic or link with -Wl,-no_pie
ld: warning: 32-bit absolute address out of range (0x10033F33C max is 4GB): from _inflate_table + 0x00000674 (0x0018866C) to 0x10033F33C
ld: warning: 32-bit absolute address out of range (0x10033F37A max is 4GB): from _inflate_table + 0x00000670 (0x0018866C) to 0x10033F37A
Debugging against the iPhoneSimulator I just get a couple of link warnings.
ld: warning: ignoring file …/…/…/libs/FreeImage/lib/ios/freeimage.a, missing required architecture i386 in file …/…/…/libs/FreeImage/lib/ios/freeimage.a (2 slices)
ld: warning: ignoring file …/…/…/libs/glu/lib/ios/glu-ios.a, missing required architecture i386 in file …/…/…/libs/glu/lib/ios/glu-ios.a (2 slices)
I tried unsuccessfully the recommendations within these warnings and suspect that such an issue has to do partially with either OF code or its project settings. A couple of times I had to modify OF code to avoid opengl2 loading since it’s not currently working and then to configure audiounits to my purpose. But definitely it is not a stable way of deal with it. Since I have no clue to track this issue further I just post it to see if someone is able to. Some of us will be glad to hear that this is fixed in a further ofxiPhone release!