From a366102b6875fe2ed33600625fbb1836cac7e24a Mon Sep 17 00:00:00 2001 From: Andrei Ashikhmin Date: Mon, 7 Jul 2025 14:05:07 +0700 Subject: [PATCH 1/3] chore: describe potential build issues --- Build issues.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Build issues.md diff --git a/Build issues.md b/Build issues.md new file mode 100644 index 000000000..e6ba3f06f --- /dev/null +++ b/Build issues.md @@ -0,0 +1,71 @@ +# Build Issues and Solutions + +## Prerequisites + +Check that you have **DashSync** repo next to the wallet repo. If fixing issues with **dash-shared-core** (e.g. CoinJoin), you'll need it next to the wallet repo as well. + +Make sure you're on the **master** branch for both DashSync and DashWallet. + +## Required Dependencies + +Install the following dependencies: + +### Install via Homebrew +```bash +brew install cmake +brew install cbindgen +brew install rust +``` + +### Xcode Setup +```bash +xcode-select --install +sudo xcodebuild -license accept +``` + +### Pod Installation +Run from the wallet directory: +```bash +pod install --verbose +``` + +## Potential Issues and Solutions + +### 1: 'dash_shared_core.h' file not found + +**Problem:** dash-shared-core was not compiled properly due to various potential reasons. + +**Solution:** Check the build log for more details. Usually caused by missing dependencies (see below). + +--- + +### 2: CBind Generation Error + +**Error:** +``` +Compiling rs-merk-verify-c-binding v0.1.3 (https://github.com/dashpay/rs-merk-verify-c-binding?branch=for-use-in-main-crate#930aeb2a) +error: failed to run custom build command for `dash-spv-coinjoin v0.1.0 (/Users/username/Development/dash-shared-core/dash-spv-coinjoin)` +``` + +**Solution:** Install cbindgen if not already installed: +```bash +brew install cbindgen +``` + +--- + +### 3: Git Repository Error with DAPI-GRPC + +**Error:** +``` +Installing DAPI-GRPC (0.22.0-dev.8) + > Git download + $ /usr/bin/git clone https://github.com/dashevo/dashsync-iOS.git + ... + fatal: not a git repository (or any of the parent directories): .git +``` + +**Solution:** Downgrade CocoaPods to version 1.15.2: +```bash +gem install cocoapods -v 1.15.2 +``` From d9fa5fad601a11ab3a72e99f69a6b014222101b3 Mon Sep 17 00:00:00 2001 From: Andrei Ashikhmin Date: Tue, 8 Jul 2025 17:50:18 +0700 Subject: [PATCH 2/3] chore: add more info & formatting --- BUILD.md | 140 ++++++++++++++++++++++++++++++++++++++++++++++++ Build issues.md | 71 ------------------------ README.md | 6 +-- 3 files changed, 143 insertions(+), 74 deletions(-) create mode 100644 BUILD.md delete mode 100644 Build issues.md diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 000000000..5515d162d --- /dev/null +++ b/BUILD.md @@ -0,0 +1,140 @@ +# Build Issues and Solutions + +## Prerequisites + +Check that you have **DashSync** repo next to the wallet repo. + +Make sure you're on the **master** branch for both DashSync and DashWallet. + +### Clang Version Check + +Check clang version: + +```bash +clang++ --version +``` + +If you see homebrew version, this might cause issues with building. You need to switch to system version. + +``` +❌ InstalledDir: /opt/homebrew/opt/llvm/bin +✅ InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +``` + +To unplug homebrew version, comment out the following in `~/.zshrc` or `~/.zsh_profile` (or `~/.bashrc` if you're using bash): + +```bash +export PATH="/opt/homebrew/opt/llvm/bin:$PATH" +``` + +## Required Dependencies + +Install the following dependencies: + +- **cmake** (version 3.28.3 recommended) +- **cbindgen** +- **rust** + +> **Note:** cmake higher than 3.5.0 might cause issues with building. Version 3.28.3 is tested and works. +> +> Download from: https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-macos-universal.dmg + +### Installation Commands + +```bash +# Install CMake +sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install + +# Install cbindgen +brew install cbindgen + +# Install Rust +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +### Xcode Setup + +```bash +xcode-select --install +sudo xcodebuild -license accept +``` + +### Pod Installation + +Run from the wallet directory: + +```bash +pod install --verbose +``` + +## Potential Issues and Solutions + +### Issue 1: CBind Generation Error + +**Error:** +``` +Compiling rs-merk-verify-c-binding v0.1.3 (https://github.com/dashpay/rs-merk-verify-c-binding?branch=for-use-in-main-crate#930aeb2a) +error: failed to run custom build command for `dash-spv-coinjoin v0.1.0 (/Users/username/Development/dash-shared-core/dash-spv-coinjoin)` +``` + +**Solution:** Install cbindgen if not already installed: + +```bash +brew install cbindgen +``` + +--- + +### Issue 2: Git Repository Error with DAPI-GRPC + +**Error:** +``` +Installing DAPI-GRPC (0.22.0-dev.8) + > Git download + $ /usr/bin/git clone https://github.com/dashevo/dashsync-iOS.git + ... + fatal: not a git repository (or any of the parent directories): .git +``` + +**Solution:** Downgrade CocoaPods to version 1.15.2. This might require upgrading Ruby to version 3.3.0 or higher: + +```bash +# Install Ruby +brew install ruby + +# Install specific CocoaPods version +sudo gem install cocoapods -v 1.15.2 +``` + +**Alternative installation:** +```bash +sudo /opt/homebrew/opt/ruby/bin/gem install -n /usr/local/bin cocoapods -v 1.15.2 +``` + +--- + +### Issue 3: 'dash_shared_core.h' file not found + +**Problem:** dash-shared-core was not compiled properly due to various potential reasons. + +**Solution:** Check the build log for more details. Usually caused by missing dependencies (see above). + +## dash-shared-core Development + +If you want to make modifications to dash-shared-core, follow these steps: + +### Setup Steps + +1. **Place dash-shared-core in the correct location:** + Put dash-shared-core in the same directory as the wallet repo. + +2. **Remove DashSharedCore from DashSync.podspec:** + ```ruby + # s.dependency 'DashSharedCore', '0.5.1' + ``` + +3. **Add local dash-shared-core to Podfile:** + In the wallet or DashSync example Podfile, add: + ```ruby + pod 'DashSharedCore', :path => '../dash-shared-core/' + ``` \ No newline at end of file diff --git a/Build issues.md b/Build issues.md deleted file mode 100644 index e6ba3f06f..000000000 --- a/Build issues.md +++ /dev/null @@ -1,71 +0,0 @@ -# Build Issues and Solutions - -## Prerequisites - -Check that you have **DashSync** repo next to the wallet repo. If fixing issues with **dash-shared-core** (e.g. CoinJoin), you'll need it next to the wallet repo as well. - -Make sure you're on the **master** branch for both DashSync and DashWallet. - -## Required Dependencies - -Install the following dependencies: - -### Install via Homebrew -```bash -brew install cmake -brew install cbindgen -brew install rust -``` - -### Xcode Setup -```bash -xcode-select --install -sudo xcodebuild -license accept -``` - -### Pod Installation -Run from the wallet directory: -```bash -pod install --verbose -``` - -## Potential Issues and Solutions - -### 1: 'dash_shared_core.h' file not found - -**Problem:** dash-shared-core was not compiled properly due to various potential reasons. - -**Solution:** Check the build log for more details. Usually caused by missing dependencies (see below). - ---- - -### 2: CBind Generation Error - -**Error:** -``` -Compiling rs-merk-verify-c-binding v0.1.3 (https://github.com/dashpay/rs-merk-verify-c-binding?branch=for-use-in-main-crate#930aeb2a) -error: failed to run custom build command for `dash-spv-coinjoin v0.1.0 (/Users/username/Development/dash-shared-core/dash-spv-coinjoin)` -``` - -**Solution:** Install cbindgen if not already installed: -```bash -brew install cbindgen -``` - ---- - -### 3: Git Repository Error with DAPI-GRPC - -**Error:** -``` -Installing DAPI-GRPC (0.22.0-dev.8) - > Git download - $ /usr/bin/git clone https://github.com/dashevo/dashsync-iOS.git - ... - fatal: not a git repository (or any of the parent directories): .git -``` - -**Solution:** Downgrade CocoaPods to version 1.15.2: -```bash -gem install cocoapods -v 1.15.2 -``` diff --git a/README.md b/README.md index 30878d33a..4f8da7ae1 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Open `DashWallet.xcworkspace` in Xcode and run the project. ## Requirements - Xcode 11 -- Dependency manager [CocoaPods](https://cocoapods.org). Install via `gem install cocoapods` +- Dependency manager [CocoaPods](https://cocoapods.org). Install via `gem install cocoapods -v 1.15.2` ### DashPay Requirements @@ -44,12 +44,10 @@ Currently, DashPay wallet is under active development so it requires a few addit 1. Clone [DashSync](https://github.com/dashevo/dashsync-iOS) and [dapi-grpc](https://github.com/dashevo/dapi-grpc) repositories: `git clone https://github.com/dashevo/dashsync-iOS.git DashSync` -`git clone https://github.com/dashevo/dapi-grpc.git dapi-grpc` To simplify developing process we use local podspec dependencies and it's important to preserve the following folder structure: ``` ../DashSync/ -../dapi-grpc/ ../dashwallet-ios/ ``` @@ -64,6 +62,8 @@ To simplify developing process we use local podspec dependencies and it's import 5. Run `pod install` in the wallet directory. +See [BUILD.md](BUILD.md) for more details. + ### Optional Requirements #### Objective-C Related From 9d1c457a8540033aaabf49d15f73b95929f4eef2 Mon Sep 17 00:00:00 2001 From: Andrei Ashikhmin Date: Tue, 8 Jul 2025 20:44:22 +0700 Subject: [PATCH 3/3] fix: cmake problematic version --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 5515d162d..0a075641c 100644 --- a/BUILD.md +++ b/BUILD.md @@ -35,7 +35,7 @@ Install the following dependencies: - **cbindgen** - **rust** -> **Note:** cmake higher than 3.5.0 might cause issues with building. Version 3.28.3 is tested and works. +> **Note:** cmake 4.0.0 or higher might cause issues with building. Version 3.28.3 is tested and works. > > Download from: https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-macos-universal.dmg