Sqlite.swift: xcode 8 Command failed due to signal: Segmentation fault: 11

Created on 26 Sep 2016  路  10Comments  路  Source: stephencelis/SQLite.swift

Trying to run project using cocoapods and Manual install and getting teh following error:

Command failed due to signal: Segmentation fault: 11

here is the error log:
CompileSwift normal x86_64 /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/AggregateFunctions.swift
cd /Users/barrettbreshears/Development/AccentShare-iOS/Pods
/Users/barrettbreshears/Downloads/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/AggregateFunctions.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Core/Blob.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/Collation.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Core/Connection.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/CoreFunctions.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/CustomFunctions.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/Expression.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Foundation.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Extensions/FTS4.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Helpers.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/Operators.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/Query.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Extensions/R*Tree.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/Schema.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Typed/Setter.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Core/Statement.swift /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/SQLite/Core/Value.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Users/barrettbreshears/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk -I /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Products/Debug-iphonesimulator/SQLite.swift -I /Users/barrettbreshears/Development/AccentShare-iOS/Pods/SQLite.swift/CocoaPods/iphonesimulator -F /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Products/Debug-iphonesimulator/SQLite.swift -enable-testing -g -import-underlying-module -module-cache-path /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/SQLite-generated-files.hmap -Xcc -I/Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/SQLite-own-target-headers.hmap -Xcc -I/Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/SQLite-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/SQLite-project-headers.hmap -Xcc -I/Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Products/Debug-iphonesimulator/SQLite.swift/include -Xcc -I/Users/barrettbreshears/Development/AccentShare-iOS/Pods/Headers/Private -Xcc -I/Users/barrettbreshears/Development/AccentShare-iOS/Pods/Headers/Public -Xcc -I/Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/DerivedSources/x86_64 -Xcc -I/Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -ivfsoverlay -Xcc /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/barrettbreshears/Development/AccentShare-iOS/Pods -emit-module-doc-path /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/Objects-normal/x86_64/AggregateFunctions~partial.swiftdoc -Onone -module-name SQLite -emit-module-path /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/Objects-normal/x86_64/AggregateFunctions~partial.swiftmodule -serialize-diagnostics-path /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/Objects-normal/x86_64/AggregateFunctions.dia -emit-dependencies-path /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/Objects-normal/x86_64/AggregateFunctions.d -emit-reference-dependencies-path /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/Objects-normal/x86_64/AggregateFunctions.swiftdeps -o /Users/barrettbreshears/Library/Developer/Xcode/DerivedData/AccentMobile_iOS_Swift-dvngujvlvcmnjzfkvawgsveookdn/Build/Intermediates/Pods.build/Debug-iphonesimulator/SQLite.swift.build/Objects-normal/x86_64/AggregateFunctions.o

0 swift 0x0000000106b9b76b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x0000000106b9aa56 llvm::sys::RunSignalHandlers() + 70
2 swift 0x0000000106b9bdbf SignalHandler(int) + 287
3 libsystem_platform.dylib 0x00007fff98d7952a _sigtramp + 26
4 libsystem_platform.dylib 0x00000000fffffff8 _sigtramp + 1730702056
5 swift 0x000000010519d206 clang::Preprocessor::MacroState::getModuleInfo(clang::Preprocessor&, clang::IdentifierInfo const_) const + 198
6 swift 0x000000010519cbfa clang::Preprocessor::getMacroDefinition(clang::IdentifierInfo const_) + 330
7 swift 0x0000000105b742ee clang::Preprocessor::HandleIdentifier(clang::Token&) + 302
8 swift 0x0000000105b19466 clang::Lexer::LexIdentifier(clang::Token&, char const_) + 262
9 swift 0x0000000105b20678 clang::Lexer::LexTokenInternal(clang::Token&, bool) + 8104
10 swift 0x0000000105b74944 clang::Preprocessor::Lex(clang::Token&) + 68
11 swift 0x0000000105b44997 clang::Preprocessor::ReadMacroName(clang::Token&, clang::MacroUse, bool_) + 55
12 swift 0x0000000105b47b50 clang::Preprocessor::HandleIfdefDirective(clang::Token&, bool, bool) + 48
13 swift 0x0000000105b46a14 clang::Preprocessor::HandleDirective(clang::Token&) + 1188
14 swift 0x0000000105b21161 clang::Lexer::LexTokenInternal(clang::Token&, bool) + 10897
15 swift 0x0000000105b74944 clang::Preprocessor::Lex(clang::Token&) + 68
16 swift 0x000000010541b03a clang::Parser::ParseTopLevelDecl(clang::OpaquePtrclang::DeclGroupRef&) + 426
17 swift 0x0000000105394bc5 clang::ParseAST(clang::Sema&, bool, bool) + 501
18 swift 0x00000001051c7a50 clang::FrontendAction::Execute() + 64
19 swift 0x00000001051929f8 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 888
20 swift 0x0000000106b37aa0 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref 21 swift 0x0000000106b37bc0 RunSafelyOnThread_Dispatch(void_) + 48
22 swift 0x0000000106b9ca6d ExecuteOnThread_Dispatch(void_) + 13
23 libsystem_pthread.dylib 0x00007fff9732599d _pthread_body + 131
24 libsystem_pthread.dylib 0x00007fff9732591a _pthread_body + 0
25 libsystem_pthread.dylib 0x00007fff97323351 thread_start + 13
Stack dump:

  1. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h:80:2: current parser token 'ifndef'

Most helpful comment

Also make sure Xcode is installed in the default location (/Applications/Xcode.app) is what fixed this for me, fwiw. I had downloaded a Xcode beta and installed it in /Applications/XCode-beta.app.

All 10 comments

do you use the xcode8 branch? is this with xcode8 final?

Same problem here! Did you find any solution?

This is likely just the issue with the modulemap only working with Xcode versions at "/Applications/Xcode.app", e.g. not Xcode-beta.app. You can rewrite the path yourself in the appropriate .modulemap file.

The path in my modulemap is correct 'Applications/Xcode.app...' I cannot figure this out. Any ideas?

It's a crash in the compiler itself. Not sure what else to suggest except maybe clearing the derived data / pods folder.

It worked for me. Thanks!

After many hours of troubleshooting I finally found the only solution that worked for me.

  1. Uninstall XCode 8.
  2. Download and install XCode 7.3.1 from here.
  3. Go the app store and install XCode 8 from there.

As a sidenote this problem seemed to affect any project that relied on sqlite3.h

I just had the same problem, triggered when using a local podspec. Check the "import paths" setting for the SQLite.swift target, make sure the paths are correct. In my case SQLite.swift was missing from the Pods/ dir.

captura de ecra 2016-10-07 as 19 16 19

Also make sure Xcode is installed in the default location (/Applications/Xcode.app)

Also make sure Xcode is installed in the default location (/Applications/Xcode.app) is what fixed this for me, fwiw. I had downloaded a Xcode beta and installed it in /Applications/XCode-beta.app.

Documentation is updated, closing.

Was this page helpful?
0 / 5 - 0 ratings