Diem: [Bug] Build error with Centos7.6

Created on 19 Jun 2019  路  2Comments  路  Source: diem/diem

馃悰 Bug

When I run command ./script/cli/start_cli_testnet.sh the error raised.

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

Caused by:
  process didn't exit successfully: `/root/workspace/libra/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" "/root/.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=/root/workspace/libra/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: /root/workspace/libra/libra/target/debug/build/grpcio-sys-c998cb3e25589d95/out/build

--- 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 Error at CMakeLists.txt:738 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:6171 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:871 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:1329 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:1329 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:7803 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:1715 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:1715 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:8012 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:2694 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:2694 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


CMake Error at CMakeLists.txt:8114 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  Expression did not evaluate to a known generator expression


thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /root/.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.

Expected Behavior

System information

Please complete the following information:

  • master branch
  • cargo 1.36.0-nightly
  • Centos7.6

I notice the problem is gRPC_PROTOBUF_PROVIDER is "module" but PROTOBUF_ROOT_DIR is wrong . How can i fix this?

bug

Most helpful comment

@Kixunil Yes, I fixed this by myself. I reinstall cmake with verion 3 and reinstall protobuf. Thanks very much. I run some code with client.

libra% query account_state 0
>> Getting latest account state
Latest account state is:
 Account: f6d22cc8e897642e4d745abcf5a6dea103707da3e1001e86c8348701334f28c0
 State: Some(
    AccountStateBlob {
     Raw: 0x010000002100000001217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc974400000020000000f6d22cc8e897642e4d745abcf5a6dea103707da3e1001e86c8348701334f28c000b4c40400000000000000000000000002000000000000000200000000000000
     Decoded: Ok(
        AccountResource {
            balance: 80000000,
            sequence_number: 2,
            authentication_key: 0xf6d22cc8e897642e4d745abcf5a6dea103707da3e1001e86c8348701334f28c0,
            sent_events_count: 2,
            received_events_count: 0,
        },
    )
     },
)
 Blockchain Version: 16084

Everythings goes successfully.

All 2 comments

Looks like a dupliate of #92
Anyway, should be fixed by #83

@Kixunil Yes, I fixed this by myself. I reinstall cmake with verion 3 and reinstall protobuf. Thanks very much. I run some code with client.

libra% query account_state 0
>> Getting latest account state
Latest account state is:
 Account: f6d22cc8e897642e4d745abcf5a6dea103707da3e1001e86c8348701334f28c0
 State: Some(
    AccountStateBlob {
     Raw: 0x010000002100000001217da6c6b3e19f1825cfb2676daecce3bf3de03cf26647c78df00b371b25cc974400000020000000f6d22cc8e897642e4d745abcf5a6dea103707da3e1001e86c8348701334f28c000b4c40400000000000000000000000002000000000000000200000000000000
     Decoded: Ok(
        AccountResource {
            balance: 80000000,
            sequence_number: 2,
            authentication_key: 0xf6d22cc8e897642e4d745abcf5a6dea103707da3e1001e86c8348701334f28c0,
            sent_events_count: 2,
            received_events_count: 0,
        },
    )
     },
)
 Blockchain Version: 16084

Everythings goes successfully.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jingtying picture jingtying  路  3Comments

n
Solexplorer picture Solexplorer  路  4Comments

beeforbacon picture beeforbacon  路  5Comments

dmitri-perelman picture dmitri-perelman  路  4Comments

davidiw picture davidiw  路  3Comments