EpicCash / epic

Blockchain Node Server with integrated Stratum Mining Server
https://epiccash.com
Apache License 2.0
25 stars 36 forks source link

Building on mac #31

Closed ghost closed 2 years ago

ghost commented 2 years ago

Cant build it on a Mac !SOLVED

$ cargo build

Compiling hyper-rustls v0.14.0
   Compiling git2 v0.10.2
   Compiling built v0.3.2
   Compiling croaring-sys v0.3.9
   Compiling randomx v0.1.0 (https://gitlab.com/epiccash/randomx-rust.git#21b3792d)
   Compiling epic_wallet v3.0.0-alpha-2 (/Users/devron/Downloads/git/epicwallet)
error: failed to run custom build command for `randomx v0.1.0 (https://gitlab.com/epiccash/randomx-rust.git#21b3792d)`

Caused by:
  process didn't exit successfully: `/Users/devron/Downloads/git/epicwallet/target/debug/build/randomx-a38eff86731ce054/build-script-build` (exit status: 101)
  --- stdout
  Starting randomx build
  running: "cmake" "/Users/devron/.cargo/git/checkouts/randomx-rust-fba834b8b9a2d6f8/21b3792/randomx" "-DCMAKE_INSTALL_PREFIX=/Users/devron/Downloads/git/epicwallet/target/debug/build/randomx-ef3a8f6e946fe925/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=Debug"
ghost commented 2 years ago

The problem was with cmake version 3.22 to fix it //

  1. download cmake version 3.20.0 copy it to the application folder url: https://cmake.org/files/v3.20/cmake-3.20.0-macos-universal.dmg
  2. install the cmake command line: sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
  3. go back to the building folder and build it again : cargo clean && cargo build --release