[swift-dev] Issues when building swift using GNU 2.26 related to protected symbols
jgroff at apple.com
Mon Feb 22 11:07:45 CST 2016
> On Feb 20, 2016, at 8:06 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> I was running some tests using newer GNU ld, and I hit this issue:
> /usr/bin/ld: stdlib/public/core/linux/x86_64/Swift.o: relocation
> R_X86_64_PC32 against protected symbol
> `_Tvs19_emptyStringStorageVs6UInt32' can not be used when making a
> shared object
> I could work around that issue by moving the definition into a C++
> file, but that didn't get me far -- I got the same error, but about
> '_TMPSa' (generic type metadata pattern for Swift.Array).
> Does it seem like a bug in LLVM codegen or another bug in GNU ld that
> was introduced recently?
> This issue will prevent Swift from compiling on Ubuntu 16.04 or a recent Debian.
Smells like a GNU ld bug to me. That relocation ought to be resolvable within the dynamic library, unless for some reason _Tvs19_emptyStringStorageVs6UInt32 is not defined in the standard library or runtime.
More information about the swift-dev