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

Linker exhausts file descriptors on Linux easily and without suggested remedy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:
      None

      Description

      This issue was discussed in https://forums.swift.org/t/linker-error-on-ubuntu-18-04-swift-5-1-2/31168. 

      When building a "large" Swift project on Linux such as https://github.com/finlabsuk/open-banking-connector it seems the following error is produced on linking:

       

      swift build /usr/bin/ld.gold: fatal error: out of file descriptors and couldn't close any clang-7: error: linker command failed with exit code 1 (use -v to see invocation) :0: error: link command failed with exit code 1 (use -v to see invocation) [0/1] Linking ProjectName
      

       

       

      The issue is reproducible with the above-mentioned project on Swift 5.1.2 / Ubuntu 18.04 (build instructions here: https://github.com/finlabsuk/open-banking-connector/blob/master/docs/installation-and-use.md).

       

      Analysis (https://forums.swift.org/t/linker-error-on-ubuntu-18-04-swift-5-1-2/31168/8) suggests the cause is related to the compiler producing a high number of output files per input files which might be reducible. In any case an actionable error message would be helpful as this situation seems to arise quite easily.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mmfl Mark Murphy
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: