[swift-dev] Issues when building swift using GNU 2.26 related to protected symbols
Joe Groff
jgroff at apple.com
Mon Feb 22 11:30:18 CST 2016
> On Feb 22, 2016, at 9:28 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
> On Mon, Feb 22, 2016 at 9:07 AM, Joe Groff <jgroff at apple.com <mailto:jgroff at apple.com>> wrote:
>>
>>> On Feb 20, 2016, at 8:06 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> 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.
>
> OK. So what's the way forward? Obviously, we can't leave Swift
> broken on Ubuntu 16.04.
Let's make sure it isn't our bug first. Is _Tvs19_emptyStringStorageVs6UInt32 defined in any of the .o or .a files that get linked into the core?
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160222/2c747ebf/attachment.html>
More information about the swift-dev
mailing list