mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
Build fails on Xcode 8 / macOS Sierra (both for Swift 2.3 and 3) #92
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HealsCodes on GitHub (Oct 20, 2016).
When trying to build CoreStore via Carthage (for use in one of my iOS apps) I'm running into this compiler crash:
Looking around the net this seems to be an issue with the swift compiler itself, but one that can be worked around be the code that triggers it.
I know it's not the fault of CoreStore but as it is I can't build the framework in any version (master / 2.1.0 / swift_3) and there is no saying when a fixed swift compiler will be included in a new Xcode release.
@JohnEstropia commented on GitHub (Oct 21, 2016):
Thanks for the report. I'll check this out.
@pointspy commented on GitHub (Oct 25, 2016):
I have the same problem...
Build fails on Xcode 8 / swift 3 / macOS EI Capitan
016-10-25 22:29:22.006 xcodebuild[31539:2558530] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-11246/IDEFoundation/Playgrounds/IDEPlaygroundAuxiliarySourceCompilerOperation.m:386
Details: Unable to read diagnostics from file "/Users/pavellyskov/Library/Developer/Xcode/DerivedData/CoreStore-bvebbsyydxxrbkhfszeyodbcelke/Build/Intermediates/CoreStore.build/Release-iphoneos/CoreStore iOS.build/Objects-normal/arm64/ObjectMonitor.dia" (Invalid File): Invalid diagnostics signature
Function: void XCGenerateDiagnosticsFromFile(NSString ___strong, NSString *__strong, NSDictionary *__strong, NSDictionary *__strong, IDEActivityLogSectionRecorder *__strong, BOOL (^__strong)(IDEActivityLogMessage *_strong))
Thread: <NSThread: 0x7f7fde855040>{number = 4, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
* BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
A shell task (/usr/bin/xcrun xcodebuild -workspace "/Users/pavellyskov/Documents/Xcode projects/iXpenses/Carthage/Checkouts/CoreStore/CoreStore.xcworkspace" -scheme "CoreStore iOS" -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
2016-10-25 22:29:22.006 xcodebuild[31539:2558530] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-11246/IDEFoundation/Playgrounds/IDEPlaygroundAuxiliarySourceCompilerOperation.m:386
Details: Unable to read diagnostics from file "/Users/pavellyskov/Library/Developer/Xcode/DerivedData/CoreStore-bvebbsyydxxrbkhfszeyodbcelke/Build/Intermediates/CoreStore.build/Release-iphoneos/CoreStore iOS.build/Objects-normal/arm64/ObjectMonitor.dia" (Invalid File): Invalid diagnostics signature
Function: void XCGenerateDiagnosticsFromFile(NSString ___strong, NSString *__strong, NSDictionary *__strong, NSDictionary *__strong, IDEActivityLogSectionRecorder *__strong, BOOL (^__strong)(IDEActivityLogMessage *_strong))
Thread: <NSThread: 0x7f7fde855040>{number = 4, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
* BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
@JohnEstropia commented on GitHub (Oct 26, 2016):
@Shirk @pointspy
The log should have a
line somewhere that contains the actual xcodebuild compilation errors. Can you send the actual log file?
@HealsCodes commented on GitHub (Oct 26, 2016):
Here you go: carthage-xcodebuild.log
This is for ~> 2.1.0
@JohnEstropia commented on GitHub (Oct 26, 2016):
@Shirk @pointspy Thanks, I checked both of your logs and it looks like compiler optimizations (-O) break the binary... Are you both running
carthage buildfrom a custom build script as instructed here?(For reference, same issue filed to the Carthage repo: https://github.com/Carthage/Carthage/issues/1359)
@HealsCodes commented on GitHub (Oct 26, 2016):
No, I still do my
carthage buildby hand, but I'll give it a try as part of my projects build steps right now!@HealsCodes commented on GitHub (Oct 26, 2016):
More updates! Building from a
Run Scriptphase doesn't change the end result.I added a run script phase that simply looks like this:
Which does what it says on the tin, but it fails with the same crash and error as if build manually outside the Xcode process:

Meanwhile I had a look at the Travis builds for CoreStore and they seem to be failing at the same spot.
@tmspzz commented on GitHub (Oct 26, 2016):
Hi,
current master builds for me in Xcode 8 (swift 2.3) - El Capitan (10.11.6)
Steps:
@pointspy commented on GitHub (Oct 26, 2016):
How can I install the swift3_develop branch using Cocoapods?
Thank you for your help
@Hurblat commented on GitHub (Oct 26, 2016):
@pointspy you can use the following:
pod 'CoreStore', :git => 'https://github.com/JohnEstropia/CoreStore.git', :branch => 'swift3_develop'
@pointspy commented on GitHub (Oct 26, 2016):
Thanks, @Hurblat!
I used Podfile:
And I have the error:
@Hurblat commented on GitHub (Oct 26, 2016):
What's your deployment target? The podspec requires a minimum of iOS 8.0.
@pointspy commented on GitHub (Oct 26, 2016):
@Hurblat thank you!
@pointspy commented on GitHub (Oct 26, 2016):
Hello!
@HealsCodes commented on GitHub (Oct 26, 2016):
@blender looks like Sierra (10.12.1) uses a newer Xcode/swiftc pairing.
The current master fails for me with the same errors as the rest.
@JohnEstropia commented on GitHub (Oct 27, 2016):
@Shirk @pointspy
Apologies for the late reply (Asian timezone..)
I've tried different configurations on my machine and the only time I've seen this error is when the Swift toolchain doesn't match the CoreStore branch
Your logs both seem to be using the
swift3_developbranch so I am assuming your app project satisfies:If this is correct, please check that your
Xcode->Preferences->Locations->Command Line Toolsis set to Xcode 8.0
If you still have problems, please tell your app's Swift version and minimum deployment version.
@HealsCodes commented on GitHub (Oct 27, 2016):
Don’t worry - I have friends in Singapore I’m used to timezone jumping ^^
My project is targeting Swift 2.3 on a deployment target of iOS 8.0 (building with the 10.0 SDK).
I’m using the latest XCode and commandoes tools.
If my log was referring to the swift3_develop branch it could be related to me trying all available branches.
I’ll try to setup a minimal project to reproduce the crash
and I’m also trying to upgrade my project to Swift 3 and recheck.
@JohnEstropia commented on GitHub (Oct 27, 2016):
@Shirk Do you have a way on your side to turn off
-Oand whole-module-optimization? Checking other sources it looks like this happens when optimizations are turned on and Carthage defaults toReleaseconfiguration. If not I'll try to prepare a branch with optimizations turned off@netbe commented on GitHub (Oct 27, 2016):
@JohnEstropia so I tried with carthage and get the same error. turning the optimization does work though:
I don't see a way to pass a build settings in Carthage (SWIFT_OPTIMIZATION_LEVEL=-O) so would it be possible to have an extra configuration or another branch?
Environment:
Xcode 8 (swift 2.3)
El Capitan (10.11.6)
My command line tools is set properly to Xcode 8.
@JohnEstropia commented on GitHub (Oct 27, 2016):
So according to @blender , turning off
whole-module-optimizationwhile keeping-Oworks. I'll try that now with both the master and swift3_develop branch.@netbe Can you verify if turning JUST
whole-module-optimizationoff works for you?@JohnEstropia commented on GitHub (Oct 27, 2016):
I mean
developandswift3_develop@netbe commented on GitHub (Oct 27, 2016):
@JohnEstropia yes it does
@JohnEstropia commented on GitHub (Oct 27, 2016):
@netbe Thanks! (sorry I didnt scroll through your xcodebuild command far enough)
@JohnEstropia commented on GitHub (Oct 27, 2016):
Thank you to everyone who helped debug the problem here and over at the slack channel!
I turned off whole-module-optimization for the
developandswift3_developbranch.Please try if it works for you (make sure to delete Carthage's cache)
If the
developbranch works fine I'll merge to themasterbranch and update the version tags.@tmspzz commented on GitHub (Oct 27, 2016):
@JohnEstropia just confirmed with @netbe (sitting next to me) that on
develop(Swift 2.3, Xcode8, ElCapitan 10.11.6) the fix works building with carthage.@JohnEstropia commented on GitHub (Oct 27, 2016):
@blender @netbe Thanks!
@HealsCodes commented on GitHub (Oct 27, 2016):
And another 👍 from me - confirmed fix for
develop(Swift 2.3, Xcode8, Sierra 10.12.1) - thanks for all the work in analyzing and working around others bugs!@HealsCodes commented on GitHub (Oct 27, 2016):
I think l can get Carthage to build in debug configuration. Worst case l can always change the settings directly. I'll get back to this once l'm back from work.
Sent from my Apple Watch
On 27 Oct 2016, at 10:33 AM, John Estropia notifications@github.com wrote:
@JohnEstropia commented on GitHub (Oct 27, 2016):
Closing this issue. If anyone still have problems feel free to request the thread reopened.
Thanks again, everyone! 🎉
@zirinisp commented on GitHub (Apr 2, 2017):
I had a similar problem and resolved it by removing whole module optimisation. The error appeared after updating from Swift 3.0 to 3.1
Thank you
@ghost commented on GitHub (May 30, 2017):
This worked for me. Turning off the "whole-module-optimization" flag in "Optimization Level" column in Build Settings for "Release" & "Debug" configs i.e. keeping "None[-Onone]" as selection.
Thank you very much for help on this blog.
@jantony-ps commented on GitHub (Dec 22, 2017):
i had similar issue. But i installed the latest command line tool for Xcode its fixed.