So I’m trying to build an app I’ve been working on for 64-bit iOS and it’s failing at the linker. The error is this:
ld: 128-bit LDR/STR not 16-byte aligned: from _pcre_study (0x1001B2E74) to l013@0x00004334 (0x1006DC85C) in ‘_pcre_study’ from …/…/…/libs/poco/lib/ios/PocoFoundation.a(pcre_study.o) for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I’m not really sure what to make of it. I can build an empy project just fine but once I copy my code into it then it doesn’t link. I don’t know what’s in my code that would cause this error. Anybody run across something like this while porting to 64-bit (or ever)?
I haven’t found this myself with the libraries however I did some reading on the ARM architecture here:
And it is possible that some of your code is touching areas in the library that is triggering this unaligned issue. The solution could be to recompile with
--no_unaligned_access, command, however I’m not sure yet.
Ah I found the same issue here:
Although I have never had a report of this issue and tutorial and sample app are known to work, it is possible that the issue is due to using an old version of Xcode, in the event that the current version which is used to build the frameworks is using an optimization that is somehow not backwards-compatible. I’m a bit skeptical that that’s the issue, but you can check it out and see.
I would recommend going through standard troubleshooting procedures: throw out the project and the downloaded OpenEarsDistribution, quit Xcode, and delete the contents of DerivedData, then restart your Mac and download a fresh version to follow the tutorial for. If that doesn’t work, I would just upgrade to the current Xcode since it’s free and you’re on Yosemite.
So make sure you have the latest Xcode, I believe Poco was built under Xcode 6.3.1 or greater
Do a clean of OpenFrameworks / Project. Restart and try again.
Yeah, seems like Xcode 6.3.1 requires OSX 10.10. I’m on 10.9 and wanted to hold off upgrading if I could. Looks like this’ll force my hand.
Yeah okay cool so definitely looks like that is the issue.
Strange for this undocumented feature / error to occur though. I’ll post an issue on the OpenFrameworks issues and close it with this as the potential solution for others.
Also 10.11 is very good if you wanted to skip to beta
Also could you add [Solved] to the title of this thread?
Yup, just updated to OSX 10.10 and Xcode 6.3.2 and it’s linking just fine now. Thanks for looking into this!