-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Swift 3 Installation Error (Carthage & Manual) #116
Comments
Hello @skreutzberger. You're right - something is wrong on macOS in the Release configuration:
|
OK so everything lies in FetchedRecordsController.swift. Each time it connects to the database, the compiler segfaults. This is unique to this file (another file uses the DatabaseWriter protocol without any trouble). |
How can I fix it? |
I have not yet found a solution. Tweaking the source code in order to present things in another way, hoping the compiler will swallow it, has not succeeded yet (and I had the time to try quite a few tweaks already). If you don't need FetchedRecordsController, move to the manual installation, and uncheck FetchedRecordsController.swift from your local copy. If you need this class, you'll have to wait for me to find a fix - if any. I hope I won't have to ship a Swift 3 version of GRDB without FetchedRecordsController (it already lacks support for SQLCipher and sqlite custom build). I'll also look for support at http://bugs.swift.org. Sorry for the inconvenience - I overlooked the Release configuration... If you want to contribute, go check #115 😄 |
No worries, I also had some issues porting all my frameworks and apps to Swift 3. Good luck, I am sure you find a solution! |
This is also a problem for iOS too when I attempt to generate an Archive build - I get the fault. A regular build is just fine. |
Are you sure it's when it connects to the database? I have commented out the bodies of all the functions and I still get a fault ... |
I can build iOS, macOS, and watchOS frameworks in Release configuration with Carthage as soon as I remove FetchedRecordsController from all targets:
Now when looking for the specific lines that make FetchedRecordsController uncompilable, I can have Xcode build GRDB for macOS by commenting out all the I'm still on it! |
Even with disabled FetchedRecordsController, tests won't run in Release mode as well 😭. This time because of the FYI, DatabaseReader and DatabaseWriter are protocols adopted by DatabaseQueue and DatabasePool. They allow FetchedRecordsController and tests to accept both kinds of connection. They're public, so that user code can be connection-agnostic when needed. |
@skreutzberger Would you try again installing GRDB with Carthage from the Swift3 branch? It should work now. The cost is disabled FetchedRecordsController: the issue is now tracked at #117. |
After b77fa8d, I am unable to build GRDB with Carthage from the swift3 branch. I receive the same SILFunctionTransform segmentation fault error as listed above. If I manually specify commit cfd6f06 in my Cartfile, GRDB updates and compiles properly. Swift version as follows: Edit: This was an XCode bug, not a GRDB bug. Solved by upgrading. Thanks to @swiftlyfalling. |
@jlefler: You are using Xcode 8.0. Several important Swift 3 compiler bugs have been fixed since 8.0. If you upgrade to Xcode 8.2.1, you should not encounter this issue. (GRDB's requirements list Xcode 8.1+. This particular compiler issue may have been fixed in 8.1.) |
I am using the latest master branch from today and try to build the GRDB for OSX which results in a segmentation fault: 11 for Swift 3 (I am using Xcode 8 GM).
I also tried installing via the latest Carthage 0.18 with the command
carthage update --no-use-binaries --platform Mac
from GRDB master branch and I see the following errors:Together with a lot of xcodebuild warnings about playground files that could not be opened in
GRDB.xcworkspace
.How can I fix it or can you please just upload here a working built .framework file for macOS with Swift 3?
The text was updated successfully, but these errors were encountered: