1

I'm trying to build gRpc on ubuntu Docker, following https://chromium.googlesource.com/external/github.com/grpc/grpc/+/HEAD/BUILDING.md.

Here's how I'm trying to compile grpc on ubuntu focal (Docker):

RUN apt-get update && apt-get install build-essential autoconf libtool pkg-config cmake
RUN curl -L https://github.com/grpc/grpc/archive/v1.32.0.zip -o grpc-1.32.0.zip 
RUN unzip grpc-1.32.0.zip \
    && cd grpc-1.32.0 \
    && mkdir -p cmake/build \
    && cd cmake/build \
    && cmake ../.. \
    && make -j \
    && make install

But I get:

CMake Warning at cmake/abseil-cpp.cmake:30 (message):
  gRPC_ABSL_PROVIDER is "module" but ABSL_ROOT_DIR is wrong
Call Stack (most recent call first):
  CMakeLists.txt:250 (include)


CMake Error at cmake/cares.cmake:25 (add_subdirectory):
  The source directory

    /tmp/grpc-1.32.0/third_party/cares/cares

  does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
  CMakeLists.txt:253 (include)


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:255 (include)


CMake Warning at cmake/re2.cmake:41 (message):
  gRPC_RE2_PROVIDER is "module" but
  RE2_ROOT_DIR(/tmp/grpc-1.32.0/third_party/re2) is wrong
Call Stack (most recent call first):
  CMakeLists.txt:256 (include)


CMake Warning at cmake/ssl.cmake:55 (message):
  gRPC_SSL_PROVIDER is "module" but BORINGSSL_ROOT_DIR is wrong
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)


CMake Warning at cmake/zlib.cmake:39 (message):
  gRPC_ZLIB_PROVIDER is "module" but ZLIB_ROOT_DIR is wrong
Call Stack (most recent call first):
  CMakeLists.txt:259 (include)

There's very little information about cares and grpc, I found this: https://stackoverflow.com/a/54819108/6655884, but I do not want to use cares, I want instead to use autotools build

Guerlando OCs
  • 1,886
  • 9
  • 61
  • 150
  • "I do not want to use cares, I want instead to use autotools build" - Eh? gRPC **needs** `cares` in any case. But there are alternatives for `cares` installation: 1. `cares` could be built by `gRPC` when this package is built. 2. `cares` could be built preliminary with CMake. 3. `cares` could be built preliminary with Autotools. If you want to follow the third way, then the end of the [accepted answer](https://stackoverflow.com/a/54819108/3440745) is for you: "defining `-D_gRPC_CARES_LIBRARIES=cares` and `-DgRPC_CARES_PROVIDER=kludge` when running cmake for gRPC." – Tsyvarev Sep 13 '20 at 09:18

0 Answers0