xpring-eng/Xpring-SDK-Demo

Failure to compile with `carthage bootstrap` command.

LoisRP opened this issue · 6 comments

I successfully ran
brew install carthage swiftlint
but failed with
carthage bootstrap .

(I retried with sudo carthage bootstrap and got the same error.

REM-ZN4L2L-M:swift lpatterson$ carthage bootstrap
*** Checking out swift-protobuf at "1.6.0"
*** Checking out grpc-swift at "0.9.1"
*** Checking out XpringKit at "1.3.0"
*** Cloning grpc-swift
*** Cloning swift-protobuf
*** Cloning XpringKit
*** xcodebuild output can be found in /var/folders/js/x7840yd52h327dps03_jxhnc0000gp/T/carthage-xcodebuild.tQcko8.log
*** Building scheme "SwiftGRPC-Package" in SwiftGRPC-Carthage.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/grpc-swift/SwiftGRPC-Carthage.xcodeproj -scheme SwiftGRPC-Package -configuration Release -derivedDataPath /Users/lpatterson/Library/Caches/org.carthage.CarthageKit/DerivedData/11.3.1_11C504/grpc-swift/0.9.1 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/js/x7840yd52h327dps03_jxhnc0000gp/T/grpc-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/grpc-swift)

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

I installed XCode Command Line Tools for 11.3.1 specifically, in case that was the problem. After doing that, I ran carthage bootstrap again, and got this error:

REM-ZN4L2L-M:swift lpatterson$ carthage bootstrap
*** Checking out swift-protobuf at "1.6.0"
*** Checking out grpc-swift at "0.9.1"
*** Checking out XpringKit at "1.3.0"
Failed to check out repository into /Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/XpringKit/xpring-common-js: could not remove submodule checkout (Error Domain=NSCocoaErrorDomain Code=513 "“xpring-common-js” couldn’t be removed because you don’t have permission to access it." UserInfo={NSFilePath=/Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/XpringKit/xpring-common-js, NSUserStringVariant=(
Remove
), NSUnderlyingError=0x7f92a24337a0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}})

Running with sudo carthage bootstrap again returned the original error.

sudo carthage bootstrap
Password:
*** Checking out swift-protobuf at "1.6.0"
*** Checking out grpc-swift at "0.9.1"
*** Checking out XpringKit at "1.3.0"
*** xcodebuild output can be found in /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/carthage-xcodebuild.DtLPYB.log
*** Building scheme "SwiftGRPC-Package" in SwiftGRPC-Carthage.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/grpc-swift/SwiftGRPC-Carthage.xcodeproj -scheme SwiftGRPC-Package -configuration Release -derivedDataPath /var/root/Library/Caches/org.carthage.CarthageKit/DerivedData/11.3.1_11C504/grpc-swift/0.9.1 -sdk watchos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/grpc-swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/grpc-swift)

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

Exit code 65 likely means you have multiple versions of command line tools installed:
https://stackoverflow.com/questions/43831086/carthage-update-task-failed-with-exit-code-65

You should probably run:

$ xcode-select -s (path of your xcode.app)

The last line of terminal output also provides a log file that may have more details:
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/carthage-xcodebuild.DtLPYB.log

Thanks for the suggestion to remove the "extra" command line tools. I removed them from Library/Developer/ and ran the command again.

REM-ZN4L2L-M:swift lpatterson$ carthage bootstrap
*** Checking out grpc-swift at "0.9.1"
*** Checking out XpringKit at "1.3.0"
*** Checking out swift-protobuf at "1.6.0"
Failed to check out repository into /Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/XpringKit/xpring-common-js: could not remove submodule checkout (Error Domain=NSCocoaErrorDomain Code=513 "“xpring-common-js” couldn’t be removed because you don’t have permission to access it." UserInfo={NSFilePath=/Users/lpatterson/xpring-sdk-demo/Xpring-SDK-Demo/swift/Carthage/Checkouts/XpringKit/xpring-common-js, NSUserStringVariant=(
Remove
), NSUnderlyingError=0x7fd48d203bc0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}})

Can you try cleaning your carthage directory?

$ sudo rm -rf Carthage 

Could you also make sure swiftlint is installed?

brew install swiftlint

(This is a dumb requirement and I'll make it go away soon)