DaveWoodCom/XCGLogger

Carthage Build Fails

viewDidAppear opened this issue · 6 comments

*** Building scheme "ObjcExceptionBridging (iOS)" in XCGLogger.xcodeproj
*** Building scheme "XCGLogger (iOS)" in XCGLogger.xcodeproj
*** Building scheme "XCGLogger (iOS)" in XCGLogger.xcodeproj
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -project /Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger.xcodeproj -scheme XCGLogger\ (iOS) -configuration Release -derivedDataPath /Users/benbenben/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/XCGLogger/6.0.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/yh/_grlhf_52ddftz2v4jy6xcsc0000gn/T/carthage-xcodebuild.dzqSce.log

Just wondering if you know why this is happening? I run manually with xcodebuild and it faults on import ObjcExceptionBridging with no such module. Am I supposed to specify something in the Cartfile?

Thanks :-)

I don't use Carthage myself, so I don't know the specifics. There was a tip just added to the Readme here: https://github.com/DaveWoodCom/XCGLogger#carthage that looks like it's related to your issue.

Developers running 5.0 and above in Swift will need to add $(SRCROOT)/Carthage/Build/iOS/ObjcExceptionBridging.framework to their Input Files in the Copy Carthage Frameworks Build Phase.

Please let me know if that fixes your issue.

swift4 or swift 3?

do carthage update with --verbose or give the log, log file is in the message

maybe it is like Thomvis/BrightFutures#177

/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:150:27: error: use of unresolved identifier 'logQueue'
        if let logQueue = logQueue {
                          ^~~~~~~~
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:193:13: error: use of unresolved identifier 'haveLoggedAppDetails'
            haveLoggedAppDetails = false
            ^~~~~~~~~~~~~~~~~~~~
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:200:161: error: cannot convert value of type 'FileDestination' to expected argument type 'DestinationProtocol?'
                owner?._logln("Unable to rotate file \(writeToFileURL.path) to \(archiveToFileURL.path): \(error.localizedDescription)", level: .error, source: self)
                                                                                                                                                                ^~~~
                                                                                                                                                                     as! DestinationProtocol
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:206:47: error: use of unresolved identifier 'identifier'
                if let identifierData: Data = identifier.data(using: .utf8) {
                                              ^~~~~~~~~~
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:207:25: error: value of type 'URL' has no member 'setExtendedAttribute'
                    try archiveToFileURL.setExtendedAttribute(data: identifierData, forName: XCGLogger.Constants.extendedAttributeArchivedLogIdentifierKey)
                        ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:210:25: error: value of type 'URL' has no member 'setExtendedAttribute'
                    try archiveToFileURL.setExtendedAttribute(data: timestampData, forName: XCGLogger.Constants.extendedAttributeArchivedLogTimestampKey)
                        ^~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:214:160: error: cannot convert value of type 'FileDestination' to expected argument type 'DestinationProtocol?'
                owner?._logln("Unable to set extended file attributes on file \(archiveToFileURL.path): \(error.localizedDescription)", level: .error, source: self)
                                                                                                                                                               ^~~~
                                                                                                                                                                    as! DestinationProtocol
/Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/Sources/XCGLogger/Destinations/FileDestination.swift:217:116: error: cannot convert value of type 'FileDestination' to expected argument type 'DestinationProtocol?'
            owner?._logln("Rotated file \(writeToFileURL.path) to \(archiveToFileURL.path)", level: .info, source: self)
                                                                                                                   ^~~~

Swift 4. I'm seeing this during build with update --verbose

I try and no issue

$ cat Cartfile
github "DaveWoodCom/XCGLogger" ~> 6.0.0
$ carthage update
*** Cloning XCGLogger
*** Checking out XCGLogger at "6.0.0"
*** xcodebuild output can be found in /var/folders/3g/bbx79_cs227blp0f8m4w8cvc0000gn/T/carthage-xcodebuild.HgyHQS.log
*** Building scheme "ObjcExceptionBridging (macOS)" in XCGLogger.xcodeproj
*** Building scheme "ObjcExceptionBridging (iOS)" in XCGLogger.xcodeproj
*** Building scheme "XCGLogger (macOS)" in XCGLogger.xcodeproj
*** Building scheme "ObjcExceptionBridging (watchOS)" in XCGLogger.xcodeproj
*** Building scheme "ObjcExceptionBridging (tvOS)" in XCGLogger.xcodeproj
*** Building scheme "XCGLogger (iOS)" in XCGLogger.xcodeproj
*** Building scheme "XCGLogger (watchOS)" in XCGLogger.xcodeproj
*** Building scheme "XCGLogger (tvOS)" in XCGLogger.xcodeproj


try to open the project in /Users/benbenben/Documents/Projects/apple-ios/Carthage/Checkouts/XCGLogger/
and build it, see if same errors occurs

try to remove carthage cache

rm -rf ./Carthage/{Build,Checkouts}/
rm -rf ~/Library/Caches/org.carthage.CarthageKit/DerivedData
carthage update --no-use-binaries --platform iOS

These three commands solved it. Blast Carthage. Cheers for the Swift 4 update, you guys are legends.

I'm closing this myself. Thanks for the tips!

@phimage @DaveWoodCom

carthage cache is boresome...