BitcoinKit
BitcoinKit copied to clipboard
How to shorten the initial install time?
Please let us hear what you think about it!
Problem
Currently initial install of BitcoinKit takes more than 10 mins on both Carthage and CocoaPods.
Mainly reason is that sh setup/build_libraries.sh
takes more than 10 mins.
It downloads and builds OpenSSL (libcrypto)
and secp256k1
.
Also, for some users, the build fails because of the lack of some dependencies like automake or libtool.
Describe what you've considered?
- Allow binary install. [convenient but not secure as build by users]
- Push OpenSSL and secp256k1 built files to Github.
- Upload binary for Carthage [users can choose binary install or self compile]
- Upload binary to CocoaPods [users can only install binary via CocoaPods]
- Do nothing
Also the first time of carthage update
always fails.
➜ carthage-measure-time time carthage update --platform iOS *** Fetching BitcoinKit *** Checking out BitcoinKit at "v1.0.1" *** xcodebuild output can be found in /var/folders/yz/0zd4ymvd4v930bqr9cx05ylm0000gn/T/carthage-xcodebuild.o7UQmJ.log *** Downloading BitcoinKit.framework binary at "v1.0.1" *** Skipped installing BitcoinKit.framework binary due to the error: "A shell task (/usr/bin/xcrun dwarfdump --uuid /private/var/folders/yz/0zd4ymvd4v930bqr9cx05ylm0000gn/T/carthage-archive.cxIOux/Carthage/Build/watchOS/KeychainAccess.framework.dSYM) failed with exit code 1: error: unable to open ''"
Falling back to building from the source *** Building scheme "BitcoinKit" in BitcoinKit.xcworkspace Build Failed Task failed with exit code 65: /usr/bin/xcrun xcodebuild -workspace /Users/shunusami/Bitcoin/swift/tmp/carthage-measure-time/Carthage/Checkouts/BitcoinKit/BitcoinKit.xcworkspace -scheme BitcoinKit -configuration Release -derivedDataPath /Users/shunusami/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/BitcoinKit/v1.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/yz/0zd4ymvd4v930bqr9cx05ylm0000gn/T/BitcoinKit SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/shunusami/Bitcoin/swift/tmp/carthage-measure-time/Carthage/Checkouts/BitcoinKit)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/yz/0zd4ymvd4v930bqr9cx05ylm0000gn/T/carthage-xcodebuild.o7UQmJ.log
carthage update --platform iOS 647.18s user 219.22s system 92% cpu 15:32.41 total
➜ carthage-measure-time time carthage update --platform iOS *** Fetching BitcoinKit *** Checking out BitcoinKit at "v1.0.1" *** xcodebuild output can be found in /var/folders/yz/0zd4ymvd4v930bqr9cx05ylm0000gn/T/carthage-xcodebuild.u2nVfa.log *** Downloading BitcoinKit.framework binary at "v1.0.1" *** Skipped installing BitcoinKit.framework binary due to the error: "A shell task (/usr/bin/xcrun dwarfdump --uuid /private/var/folders/yz/0zd4ymvd4v930bqr9cx05ylm0000gn/T/carthage-archive.aJ8zZg/Carthage/Build/watchOS/KeychainAccess.framework.dSYM) failed with exit code 1: error: unable to open ''"
Falling back to building from the source
*** Building scheme "BitcoinKit" in BitcoinKit.xcworkspace
*** Building scheme "KeychainAccess" in KeychainAccess.xcworkspace
carthage update --platform iOS 244.88s user 32.39s system 191% cpu 2:24.95 total
I have to add that binary install is convenient but not secure as build by users
.
I don't think build time can be improved. At best, the openssl archive can be stored in the github repo instead of downloading directly from openssl.org, but download time is not that significant.
For example: https://github.com/oleganza/CoreBitcoin/blob/master/update_openssl.sh
Any updates here? I'm having a lot of problems trying to integrate BitCoinKit into my project with both Pods and Cart