Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-3868] Unable to import Glibc, Foundation or Dispatch in REPL (linux) #46453

Closed
ankitspd opened this issue Feb 6, 2017 · 0 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@ankitspd
Copy link
Member

ankitspd commented Feb 6, 2017

Previous ID SR-3868
Radar None
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Duplicate
Environment

swift-DEVELOPMENT-SNAPSHOT-2017-02-05-a-ubuntu16.04

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 2d93fa486bc6a8a7826aae6dc2bac558

duplicates:

  • SR-3794 import Glibc does not work from the swift 3.1-dev REPL

Issue Description:

Toolchain: swift-DEVELOPMENT-SNAPSHOT-2017-02-05-a-ubuntu16.04

$ swift
Welcome to Swift version 3.1-dev (LLVM b3c73ec880, Clang ef793ebbfc, Swift 8870900730). Type :help for assistance.
  1> import Glibc
<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>
         ^

error: could not build Objective-C module 'SwiftGlibc'
$ swift
Welcome to Swift version 3.1-dev (LLVM b3c73ec880, Clang ef793ebbfc, Swift 8870900730). Type :help for assistance.
  1> import Dispatch
/usr/include/x86_64-linux-gnu/sys/cdefs.h:23:11: note: while building module 'SwiftGlibc' imported from /usr/include/x86_64-linux-gnu/sys/cdefs.h:23:
# include <features.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 "dispatch.h"
         ^

/home/ubuntu/toolchain/usr/lib/swift/dispatch/dispatch.h:41:10: note: in file included from /home/ubuntu/toolchain/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 'CDispatch'
$ swift
Welcome to Swift version 3.1-dev (LLVM b3c73ec880, Clang ef793ebbfc, Swift 8870900730). Type :help for assistance.
  1> import Foundation
/home/ubuntu/toolchain/usr/lib/swift/CoreFoundation/CoreFoundation.h:25:10: note: while building module 'SwiftGlibc' imported from /home/ubuntu/toolchain/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/ubuntu/toolchain/usr/lib/swift/CoreFoundation/CoreFoundation.h:25:10: error: could not build module 'SwiftGlibc'
#include <sys/types.h>
         ^

/home/ubuntu/toolchain/usr/lib/swift/CoreFoundation/CFStream.h:20:10: note: while building module 'CDispatch' imported from /home/ubuntu/toolchain/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/ubuntu/toolchain/usr/lib/swift/dispatch/dispatch.h:41:10: note: in file included from /home/ubuntu/toolchain/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'
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant