protoc-grpcio icon indicating copy to clipboard operation
protoc-grpcio copied to clipboard

cmake = 0.1.46 breaks compilation

Open mygnu opened this issue 4 years ago • 1 comments

after running cargo update on my project it fails with the following

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

Caused by:
  process didn't exit successfully: `/target/release/build/grpcio-sys-b68f9838a28e5f40/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=grpc_wrap.cc
  cargo:rerun-if-changed=grpc
  cargo:rerun-if-env-changed=UPDATE_BIND
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=GRPCIO_SYS_USE_PKG_CONFIG
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rerun-if-env-changed=CARGO_CFG_TARGET_OS
  cargo:rustc-link-search=native=/target/x86_64-unknown-linux-gnu/release/build/libz-sys-59bf788a8acc8bd7/out/build
  cargo:rustc-link-search=native=/target/x86_64-unknown-linux-gnu/release/build/libz-sys-59bf788a8acc8bd7/out/lib
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = Some("/target/x86_64-unknown-linux-gnu/release/build/libz-sys-59bf788a8acc8bd7/out/build")
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/cargo/registry/src/github.com-1ecc6299db9ec823/grpcio-sys-0.6.0/grpc" "-DgRPC_INSTALL=false" "-DgRPC_BUILD_CSHARP_EXT=false" "-DgRPC_BUILD_CODEGEN=false" "-DgRPC_BENCHMARK_PROVIDER=none" "-DgRPC_SSL_PROVIDER=package" "-DgRPC_ZLIB_PROVIDER=package" "-DCMAKE_INSTALL_PREFIX=/target/x86_64-unknown-linux-gnu/release/build/grpcio-sys-a2da621fb4d4ddf1/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_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /target/x86_64-unknown-linux-gnu/release/build/grpcio-sys-a2da621fb4d4ddf1/out/build
  running: "cmake" "--build" "." "--target" "grpc" "--config" "Release" "--parallel" "32"

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


  Unknown argument --parallel
  Unknown argument 32
  Usage: cmake --build <dir> [options] [-- [native-options]]
  Options:
    <dir>          = Project binary directory to be built.
    --target <tgt> = Build <tgt> instead of default targets.
                     May only be specified once.
    --config <cfg> = For multi-configuration tools, choose <cfg>.
    --clean-first  = Build target 'clean' first, then build.
                     (To clean only, use --target 'clean'.)
    --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
    --             = Pass remaining options to the native tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

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

I think cmake patch bump broke, pinning it to previous version works fine

```[build-dependencies]
protoc-grpcio = "3.0"
cmake = "=0.1.45"

mygnu avatar Oct 14 '21 10:10 mygnu

related https://github.com/alexcrichton/cmake-rs/issues/131

mygnu avatar Oct 14 '21 11:10 mygnu