tikv / grpc-rs

The gRPC library for Rust built on C Core library and futures
Apache License 2.0
1.81k stars 253 forks source link

Error when compile with version : 0.10.1 - ubuntu #570

Closed linuxpham closed 2 years ago

linuxpham commented 2 years ago

Describe the bug

Os : ubuntu Cmake : cmake version 3.16.3 Gcc: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

Can not link with version: 0.10.1 on ubuntu (macOS is OK)

multiple definition of `grpcwrap_server_request_call'; /source/target/x86_64-unknown-linux-gnu/release/deps/libgrpcio_sys-9ea061c418085455.rlib(grpc_wrap.o):grpc_wrap.cc:(.text.grpcwrap_server_request_call+0x0): first defined here

To Reproduce

  1. Vesion 0.9.1 => compile OK
  2. change to 0.10.1
  3. Can not compile on Ubuntu
linuxpham commented 2 years ago

Screen Shot 2022-04-15 at 20 19 52

BusyJay commented 2 years ago

You are mixing different version of the crates. grep -A 1 'name = "grpcio-sys"' Cargo.lock should show at least two different results.

linuxpham commented 2 years ago

Yes, it is a problem with the Cargo.lock . Thank you so much !