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

could not build Objective-C module 'Foundation' #290

Open
jondoes opened this issue Sep 9, 2019 · 0 comments
Open

could not build Objective-C module 'Foundation' #290

jondoes opened this issue Sep 9, 2019 · 0 comments

Comments

@jondoes
Copy link

jondoes commented Sep 9, 2019

While build project with "swift build" command, it gives this kind of error:
<unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true

I use "Swift 3.1 Release" and Xcode 9.4 to build my swift server side project.
Please help.

Here is full error message for better understanding:
Abhis-Mac:TooGoodToLeave-Swift_backend tristatetechnology$ swift build Compile Swift Module 'MimeLib' (3 sources) Compile Swift Module 'Bits' (19 sources) Compile Swift Module 'PerfectRepeater' (1 sources) Compile Swift Module 'SwiftMoment' (6 sources) Compile Swift Module 'PerfectLib' (10 sources) Compile Swift Module 'SwiftString' (3 sources) /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' Compile Swift Module 'SwiftRandom' (3 sources) /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' Compile Swift Module 'PerfectThread' (3 sources) /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' /Applications/Xcode9.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric' SwiftImportAsNonGeneric: true ^ <unknown>:0: error: could not build Objective-C module 'Foundation' <unknown>:0: error: build had 8 command failures error: exit(1): /Library/Developer/Toolchains/swift-3.1-RELEASE.xctoolchain/usr/bin/swift-build-tool -f /Abhi/Swift_Backend/To_Good_To_Leave/AWS_SourceCode/TooGoodToLeave-Swift_backend/.build/debug.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant