[swift-dev] R_ARM_GOT_PREL error when building Swift on Pi from source
jgroff at apple.com
Fri Apr 15 20:45:21 CDT 2016
> On Apr 15, 2016, at 1:24 PM, Timothy Wood via swift-dev <swift-dev at swift.org> wrote:
> I was able to get Swift running on my Raspberry Pi using a variant of the instructions at <http://dev.iachieved.it/iachievedit/open-source-swift-on-raspberry-pi-2/> but sadly the packages I’ve found haven’t been updated for Swift 2.2 (so things like `associatedtype` don’t work nicely between Mac and Linux).
> So, I thought I’d try building from source again hoping that the previous failure was resolved. But I’m still hitting the unimplemented relocation issue in LLVM’s RuntimeDyldELF.cpp, in RuntimeDyldELF::resolveARMRelocation(), where the relocation type that is being requested is R_ARM_GOT_PREL.
> I thought I read in my last go-round on this that this was a regression in LLVM, but I’m not finding a pointer to this now, so maybe I’m misremembering.
> Is there a trick to avoiding this issue in LLVM, or an existing patch somewhere that I can cherry-pick?
What linker are you using? GNU ld 2.26 in particular changed the behavior of protected visibility in a way that's incompatible with our usage, and we haven't fully implemented a workaround. You might try using gold or an older binutils, if that's what you're currently using.
More information about the swift-dev