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

Unable to Import Foundation

    XMLWordPrintable

    Details

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

      Ubuntu 16.10 Swift version 3.1-dev (LLVM 7e421db87c, Clang 4a0ed6aa35, Swift 5a2474152b)

      Description

      I am unable to use Foundation as it sparks an error when trying to find its own files.

      $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/CoreFoundation/CoreFoundation.h:25:10: note: while building module 'SwiftGlibc' imported from $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/CoreFoundation/CoreFoundation.h:25:
      #include <sys/types.h>
               ^
      
      <module-includes>:3:10: note: in file included from <module-includes>:3:
      #include "///usr/include/utmp.h"
               ^
      
      ///usr/include/utmp.h:23:10: note: in file included from ///usr/include/utmp.h:23:
      #include <sys/types.h>
               ^
      
      error: /usr/include/x86_64-linux-gnu/sys/types.h:146:10: error: 'stddef.h' file not found
      #include <stddef.h>
               ^
      
      <module-includes>:1:10: note: in file included from <module-includes>:1:
      #include "CoreFoundation.h"
               ^
      
      error: $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/CoreFoundation/CoreFoundation.h:25:10: error: could not build module 'SwiftGlibc'
      #include <sys/types.h>
               ^
      
      $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/CoreFoundation/CFStream.h:20:10: note: while building module 'CDispatch' imported from $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/CoreFoundation/CFStream.h:20:
      #include <dispatch/dispatch.h>
               ^
      
      <module-includes>:1:10: note: in file included from <module-includes>:1:
      #include "dispatch.h"
               ^
      
      $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/dispatch/dispatch.h:41:10: note: in file included from $HOME/swift-DEVELOPMENT-SNAPSHOT-2017-01-14-a-ubuntu16.10/usr/lib/swift/dispatch/dispatch.h:41:
      #include <sys/cdefs.h>
               ^
      
      error: /usr/include/x86_64-linux-gnu/sys/cdefs.h:23:11: error: could not build module 'SwiftGlibc'
      # include <features.h>
                ^
      
      error: could not build Objective-C module 'CoreFoundation'
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Deltalus Emilio Espinosa
              Votes:
              10 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated: