Uploaded image for project: 'Swift'
  1. Swift
  2. SR-1294

Ubuntu 16.04 swift fails to link: protected relocation issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      Ubuntu 16.04 (final release) x86_64, clang-3.8, clang-3.6

      Description

      I get the following linkage error, regardless of using clang-3.8 or clang-3.6 for the build (in both cases, with a symlink from /usr/bin/clang and /usr/bin/clang++ to the right one):

      [565/652] Linking CXX shared library lib/swift/linux/x86_64/libswiftCore.so
      FAILED: lib/swift/linux/x86_64/libswiftCore.so
      : && /usr/bin/clang++ -fPIC -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -O3 -Wl,-z,defs -target x86_64-unknown-linux-gnu -isysroot / -lpthread -ldl -L/home/tfiala/src/lldb-github/build/buildbot_linux/swift-linux-x86_64/./lib/swift/linux/x86_64 -L/home/tfiala/src/lldb-github/build/buildbot_linux/swift-linux-x86_64/./bin/../lib/swift/linux/x86_64 -L/home/tfiala/src/lldb-github/build/buildbot_linux/swift-linux-x86_64/./bin/../lib/swift/linux -shared -Wl,-soname,libswiftCore.so -o lib/swift/linux/x86_64/libswiftCore.so lib/swift/linux/x86_64/swift_begin.o stdlib/public/core/linux/x86_64/Swift.o lib/swift/linux/x86_64/swift_end.o -L/home/tfiala/src/lldb-github/build/buildbot_linux/llvm-linux-x86_64/lib -L/home/tfiala/src/lldb-github/build/buildbot_linux/llvm-linux-x86_64/./lib lib/swift/linux/x86_64/libswiftRuntime.a lib/swift/linux/x86_64/libswiftStdlibStubs.a -licuuc -licui18n -Wl,-rpath,"\$ORIGIN:/usr/lib/swift/linux" && :
      /usr/bin/ld: stdlib/public/core/linux/x86_64/Swift.o: relocation R_X86_64_PC32 against protected symbol `_TMPSa' can not be used when making a shared object
      /usr/bin/ld: final link failed: Bad value
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      [565/652] Linking CXX static library lib/swift_static/linux/x86_64/libswiftCore.a
      ninja: build stopped: subcommand failed.

      I've also tried with gold linker and without.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tfiala Todd Fiala
              Reporter:
              tfiala Todd Fiala
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: