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.