sitecore-ios-sdk
sitecore-ios-sdk copied to clipboard
Project with target iOS 7 cannot be compiled with Mobile SDK framework for device simulator
And it is not tested for real arm64 hardware
Reproduced on simulator only. Deployment Target = iOS7
Errors for the empty project :
too many compact unwind infos in function anon for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Errors for one of auto test projects (SCContactsTest) :
0 0x104bed724 __assert_rtn + 144
1 0x104c4da0a ld::Atom::finalAddress() const + 58
2 0x104c498cc ld::tool::OutputFile::applyFixUps(ld::Internal&, unsigned long long, ld::Atom const*, unsigned char*) + 702
3 0x104c4ad5a ld::tool::OutputFile::writeAtoms(ld::Internal&, unsigned char*) + 262
4 0x104c47f3b ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 583
5 0x104c4233b ld::tool::OutputFile::write(ld::Internal&) + 147
6 0x104bedc6e main + 1012
7 0x7fff8d09a7e1 start + 0
A linker snapshot was created at:
/tmp/SCContactsTest-2013-09-29-111109.ld-snapshot
ld: Assertion failed: (_mode == modeFinalAddress), function finalAddress, file /SourceCache/ld64/ld64-224.1/src/ld/ld.hpp, line 689.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
https://devforums.apple.com/message/886537#886537
I can reproduce the error in a small test case,
but only if I run "strip -x" on the static library.
That option to strip removes local symbols (e.g the names of static functions). In xcode, the -x may come from "Additional Strip Flags" or from "Strip Style" being set to "Non-Global Symbols". Strip -x is usually only used when you want to hide/obfuscate functions names.
If your static library does have local symbols stripped, a work around would be to rebuild it and keep local symbols (no strip -x).
After applying this we get the same errors for both projects :
0 0x104bed724 __assert_rtn + 144
1 0x104c4da0a ld::Atom::finalAddress() const + 58
2 0x104c498cc ld::tool::OutputFile::applyFixUps(ld::Internal&, unsigned long long, ld::Atom const*, unsigned char*) + 702
3 0x104c4ad5a ld::tool::OutputFile::writeAtoms(ld::Internal&, unsigned char*) + 262
4 0x104c47f3b ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 583
5 0x104c4233b ld::tool::OutputFile::write(ld::Internal&) + 147
6 0x104bedc6e main + 1012
7 0x7fff8d09a7e1 start + 0
A linker snapshot was created at:
/tmp/SCContactsTest-2013-09-29-111109.ld-snapshot
ld: Assertion failed: (_mode == modeFinalAddress), function finalAddress, file /SourceCache/ld64/ld64-224.1/src/ld/ld.hpp, line 689.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
An answer may come up in one of these threads.
http://stackoverflow.com/questions/11683877/xcode-4-4-clang-error-linker-failed https://parse.com/questions/parse-building-error-xcode-45
The issue is reproduced for x86_64 architecture only. However, Xcode5 uses it by default for simulator builds.
xcodebuild -target SampleApp -configuration Debug -sdk iphonesimulator -arch i386
** BUILD SUCCEEDED **
As a workaround you can create a target with "$(ARCHS_STANDARD)" architectures. Your project will build only for i386 architecture and run under the simulator. You should use the original target for running an app on the device.
@sawithington @dodikk88 it's a bug/failed assert in the linker that comes with clang -
you just need a compiler update
Rob Pilling ( @bobrippling )