Installation breaks

cargo build on Mac OS X breaks. Have anyone else encountered this issue before?

$cargo build
Compiling grpcio-sys v0.4.4
error: failed to run custom build command for grpcio-sys v0.4.4

Caused by:
process didn’t exit successfully: /Users/nsankaran/Projects/opensource/blockchain/libra/target/debug/build/grpcio-sys-84670f7e330a0516/build-script-build (exit code: 101)
— stdout
cargo:rerun-if-changed=grpc_wrap.cc
cargo:rerun-if-changed=grpc
cargo:rerun-if-env-changed=GRPCIO_SYS_USE_PKG_CONFIG
cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
running: “cmake” “/Users/nsankaran/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.4.4/grpc” “-DgRPC_INSTALL=false” “-DgRPC_BUILD_CSHARP_EXT=false” “-DgRPC_BUILD_CODEGEN=false” “-DgRPC_BENCHMARK_PROVIDER=none” “-DCMAKE_INSTALL_PREFIX=/Users/nsankaran/Projects/opensource/blockchain/libra/target/debug/build/grpcio-sys-008d81a923885192/out” “-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_C_COMPILER=/usr/bin/cc” “-DCMAKE_CXX_FLAGS= -stdlib=libc++ -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_CXX_COMPILER=/usr/bin/c++” “-DCMAKE_BUILD_TYPE=Debug”
– Configuring done
– Generating done
– Build files have been written to: /Users/nsankaran/Projects/opensource/blockchain/libra/target/debug/build/grpcio-sys-008d81a923885192/out/build
running: “cmake” “–build” “.” “–target” “grpc” “–config” “Debug” “–”
[ 0%] Generating err_data.c
[ 2%] Built target buf
[ 2%] Built target lhash
[ 2%] Built target base64
[ 2%] Built target bytestring
[ 2%] Built target stack
[ 2%] Built target fiat
[ 4%] Built target crypto_base
[ 4%] Built target rc4
[ 4%] Built target digest_extra
[ 4%] Built target chacha
[ 4%] Built target curve25519
[ 4%] Built target pool
[ 4%] Built target poly1305
[ 4%] Built target conf
[ 4%] Built target engine
[ 4%] Built target rand_extra
[ 4%] Built target obj
[ 4%] Built target bn_extra
[ 6%] Built target bio
[ 9%] Built target cipher_extra
[ 11%] Built target asn1
[ 11%] Built target dh
[ 13%] Built target dsa
[ 13%] Built target ec_extra
[ 13%] Built target rsa_extra
[ 13%] Built target ecdh
[ 13%] Built target ecdsa_extra
[ 13%] Built target cmac

— stderr
CMake Warning at cmake/protobuf.cmake:48 (message):
gRPC_PROTOBUF_PROVIDER is “module” but PROTOBUF_ROOT_DIR is wrong
Call Stack (most recent call first):
CMakeLists.txt:140 (include)

CMake Warning at cmake/gflags.cmake:26 (message):
gRPC_GFLAGS_PROVIDER is “module” but GFLAGS_ROOT_DIR is wrong
Call Stack (most recent call first):
CMakeLists.txt:142 (include)

CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run “cmake
–help-policy CMP0042” for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

zlib

This warning is for project developers. Use -Wno-dev to suppress it.

errors

compile: version “go1.10” does not match go tool version “go1.11.4”

unicode/utf8

compile: version “go1.10” does not match go tool version “go1.11.4”

internal/race

compile: version “go1.10” does not match go tool version “go1.11.4”

runtime/internal/sys

compile: version “go1.10” does not match go tool version “go1.11.4”

internal/cpu

compile: version “go1.10” does not match go tool version “go1.11.4”

unicode

compile: version “go1.10” does not match go tool version “go1.11.4”

runtime/internal/atomic

compile: version “go1.10” does not match go tool version “go1.11.4”

sync/atomic

compile: version “go1.10” does not match go tool version "go1.11.4"
make[3]: *** [third_party/boringssl/crypto/err/err_data.c] Error 2
make[3]: *** Deleting file `third_party/boringssl/crypto/err/err_data.c’
make[2]: *** [third_party/boringssl/crypto/err/CMakeFiles/err.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [CMakeFiles/grpc.dir/rule] Error 2
make: *** [grpc] Error 2
thread ‘main’ panicked at ’
command did not execute successfully, got: exit code: 2

build script failed, must exit now’, /Users/nsankaran/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.40/src/lib.rs:832:5
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.

1 Like

Setup protoc

Make sure you’re using the latest version.

1 Like

I had the latest version of protoc.

What solved it for me is to update my CMake.

brew upgrade cmake
and continue compile, worked.

3 Likes

Glad to hear it was resolved.

Excuse me, I got the error like you. Then I solved the way you solved but I got that error again. If you don’t mind Can you show me the way to solve that error on linux.?

same here @saeveritt,

cmake is already the newest version (3.10.2-1ubuntu2).

but

error: failed to run custom build command for `grpcio-sys v0.4.4`

Caused by:
  process didn't exit successfully: `/home/ubuntu/environment/AWS-Libra-Blockchain/Phase 1 - My First Transaction (on Cloud9)/libra/target/debug/build/grpcio-sys-18712f499919ddc1/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=grpc_wrap.cc
cargo:rerun-if-changed=grpc
cargo:rerun-if-env-changed=GRPCIO_SYS_USE_PKG_CONFIG
cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
running: "cmake" "/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.4.4/grpc" "-DgRPC_INSTALL=false" "-DgRPC_BUILD_CSHARP_EXT=false" "-DgRPC_BUILD_CODEGEN=false" "-DgRPC_BENCHMARK_PROVIDER=none" "-DCMAKE_INSTALL_PREFIX=/home/ubuntu/environment/AWS-Libra-Blockchain/Phase 1 - My First Transaction (on Cloud9)/libra/target/debug/build/grpcio-sys-c998cb3e25589d95/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"
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/environment/AWS-Libra-Blockchain/Phase 1 - My First Transaction (on Cloud9)/libra/target/debug/build/grpcio-sys-c998cb3e25589d95/out/build
running: "cmake" "--build" "." "--target" "grpc" "--config" "Debug" "--"
[  0%] Built target fiat
[  2%] Built target crypto_base
[  2%] Built target stack
[  4%] Built target lhash
[  4%] Generating err_data.c
third_party/boringssl/crypto/err/CMakeFiles/err.dir/build.make:83: recipe for target 'third_party/boringssl/crypto/err/err_data.c' failed
CMakeFiles/Makefile2:1867: recipe for target 'third_party/boringssl/crypto/err/CMakeFiles/err.dir/all' failed
CMakeFiles/Makefile2:346: recipe for target 'CMakeFiles/grpc.dir/rule' failed
Makefile:255: recipe for target 'grpc' failed

--- stderr
CMake Warning at cmake/protobuf.cmake:48 (message):
  gRPC_PROTOBUF_PROVIDER is "module" but PROTOBUF_ROOT_DIR is wrong
Call Stack (most recent call first):
  CMakeLists.txt:140 (include)


CMake Warning at cmake/gflags.cmake:26 (message):
  gRPC_GFLAGS_PROVIDER is "module" but GFLAGS_ROOT_DIR is wrong
Call Stack (most recent call first):
  CMakeLists.txt:142 (include)


/bin/sh: 1: Syntax error: "(" unexpected
make[3]: *** [third_party/boringssl/crypto/err/err_data.c] Error 2
make[2]: *** [third_party/boringssl/crypto/err/CMakeFiles/err.dir/all] Error 2
make[1]: *** [CMakeFiles/grpc.dir/rule] Error 2
make: *** [grpc] Error 2
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

build script failed, must exit now', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.40/src/lib.rs:832:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

any idea ? im following this https://github.com/jonrau1/AWS-Libra-Blockchain/tree/master/Phase%201%20-%20My%20First%20Transaction%20(on%20Cloud9)

1 Like

Hi all,
I had same issue but in Ubuntu 18.04, i resolved it by https://askubuntu.com/questions/1131195/how-to-address-apt-upgrade-problem-involving-libglx-mesa0-and-nvidia-driver
br

Could you solve this issue? Cmake version is up to date in my case (cmake version 3.15.0-rc4)

I have soloved it by updating cmake(3.14.5)