0

I get this issue when I try to build the substrate-node-template

error: failed to run custom build command for `prost-build v0.10.4`

Caused by:
  process didn't exit successfully: `/Users/elioprifti/substrate-node-template/target/debug/build/prost-build-842a283f6884a648/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=/Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.4/third-party/protobuf/cmake
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.4/third-party/protobuf/cmake" "-Dprotobuf_BUILD_TESTS=OFF" "-DCMAKE_INSTALL_PREFIX=/Users/elioprifti/substrate-node-template/target/debug/build/prost-build-ff54cba47a5a17d8/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"

  --- stderr
  thread 'main' panicked at '
  failed to execute command: No such file or directory (os error 2)
  is `cmake` not installed?

  build script failed, must exit now', /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
elioprifti@pc-193-62 substrate-node-template % 

Rust configuration:

elioprifti@pc-193-62 ~ % rustup show                                
rustup +nightly show

Default host: aarch64-apple-darwin
rustup home:  /Users/elioprifti/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.63.0 (4b91a6ea7 2022-08-08)

Default host: aarch64-apple-darwin
rustup home:  /Users/elioprifti/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)
rustc 1.65.0-nightly (2e35f954a 2022-09-01)

elioprifti@pc-193-62 ~ % 

Any idea?

3 Answers 3

2

The error is pointing this out:

is `cmake` not installed?
1
  • Yes, 'cmake' is installed
    – P.E
    Commented Sep 2, 2022 at 14:15
1

Always restart your machine, this fixed it!

0

Looks like it is not finding it.

brew update
brew uninstall cmake
brew install cmake

Make sure it is installed:

cmake --help

Make sure you follow the steps here:

3
  • I followed the steps above. elioprifti@pc-193-62 ~ % cmake --version cmake version 3.24.1 CMake suite maintained and supported by Kitware (kitware.com/cmake). elioprifti@pc-193-62 ~ %
    – P.E
    Commented Sep 2, 2022 at 15:07
  • 1
    I am running the same version on an M1 and substrate-node-template builds fine.
    – Bruno
    Commented Sep 2, 2022 at 15:54
  • 3
    I had to restart my pc to fix it. Thank you!
    – P.E
    Commented Sep 2, 2022 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.