Uploaded image for project: 'Swift'
  1. Swift
  2. SR-40 Port Swift to Linux on Raspberry Pi
  3. SR-359

Undef. symbols when linking to Foundation (ARM)

    XMLWordPrintable

    Details

      Description

      Applications linking to Framework on Linux-ARM fail to link. There are (at least) three undefined symbols:

      {{wdillon@tegra-ubuntu:~$ swiftc frameworkTest.swift
      /opt/apple/usr/lib/swift/linux/libFoundation.so: undefined reference to `TTSf4s_s_s_n_TFs18_fatalErrorMessageFTVs12StaticStringS_S_Su_T'
      /opt/apple/usr/lib/swift/linux/libFoundation.so: undefined reference to `_TFVs13_StringBufferg9usedCountSi'
      /opt/apple/usr/lib/swift/linux/libFoundation.so: undefined reference to `TTSf4s_TFVs11_StringCore15_invariantCheckfT_T'
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
      wdillon@tegra-ubuntu:~$
      }}

      The demangled references all seem to call back into string:

      function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Exploded> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt) -> ()
      Swift._StringBuffer.usedCount.getter : Swift.Int
      function signature specialization <Arg[0] = Exploded> of Swift._StringCore._invariantCheck () -> ()

      Swift._fatalErrorMessage() exists in stdlib/public/core/AssertCommon.swift
      The comment in the implementation of _fatalErrorMessage says that it should not be used outside of the implementation of stdlib. It's not clear why foundation would be referencing it.

        Attachments

          Activity

            People

            • Assignee:
              hpux735 William Dillon
              Reporter:
              hpux735 William Dillon
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: