[swift-server-dev] import Foundation => could not build Objective-C module 'CoreFoundation'
Andrew Cornett
amotion at me.com
Wed Jan 18 08:57:18 CST 2017
Has anyone been able to `import Foundation` using a development snapshot on Ubuntu 14.04? I'm getting errors that make it seem like my environment isn't setup correctly, but the same environment works fine for the 3.0.2 release.
```
root at a079e93a1c57:/# swift
Welcome to Swift version 3.1-dev (LLVM 7e421db87c, Clang 8df9d5d9f9, Swift 6f08335ce0). Type :help for assistance.
1> import Foundation
error: /usr/include/x86_64-linux-gnu/sys/types.h:146:10: error: 'stddef.h' file not found
error: /usr/lib/swift/CoreFoundation/CoreFoundation.h:25:10: error: could not build module 'SwiftGlibc'
error: /usr/include/x86_64-linux-gnu/sys/cdefs.h:23:11: error: could not build module 'SwiftGlibc'
error: could not build Objective-C module 'CoreFoundation'
```
I've tried manually providing some include paths to the swift command, which did remove the SwiftGlibc error, but nothing else seems to be working out for me :-(
```
root at a079e93a1c57:/# swift -I /usr/include/lldb/Symbol -I /usr/lib/swift/clang/include
Welcome to Swift version 3.1-dev (LLVM 7e421db87c, Clang 8df9d5d9f9, Swift 6f08335ce0). Type :help for assistance.
1> import Glibc
2>
3> print(random())
1804289383
4>
5> import Foundation
error: /usr/lib/swift/CoreFoundation/CoreFoundation.h:26:10: error: 'stdarg.h' file not found
error: /usr/lib/swift/dispatch/dispatch.h:43:10: error: 'stddef.h' file not found
error: could not build Objective-C module 'CoreFoundation'
```
Since the 3.0.2 release version can import Foundation no problem, I'm wondering if there's something I'm missing when setting up a new development snapshot?
More information about the swift-server-dev
mailing list