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

swift-package-manager link doesn't seem to respect the gold linker flag on Ubuntu

    XMLWordPrintable

    Details

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

      Ubuntu 16.04 x86_64.

      Description

      In trying to find a working solution for SR-1023, I'm trying to build the full packaging CI setup on Unbuntu 16.04. That fails with a relocation issue on the standard linker, so I'm trying to use the gold linker. In building <>, I hit the following:

      Link /home/tfiala/src/lldb-github/build/buildbot_linux/swiftpm-linux-x86_64/.bootstrap/bin/swift-build
      /usr/bin/ld: /home/tfiala/src/lldb-github/build/buildbot_linux/swiftpm-linux-x86_64/.bootstrap/lib/PackageDescription.a(Package.o): relocation R_X86_64_PC32 against protected symbol `_TMLCC18PackageDescription7Package10Dependency' 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)

      The swift-build step is not using the gold linker.

      This may boil down to swiftc being used to link, and it itself is choosing to call clang to link, and isn't setup to specify usage of the gold linker. But this should be investigated, and regardless of the cause, we want to get gold linking working if at all possible.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: