Ubuntu18.04 编译安装 grpc
apt-get install -y build-essential autoconf libtool pkg-config cmake libgflags-dev libgtest-dev clang-5.0 libc++-dev libssl-dev wgetgit clone -b v1.27.3 https://github.com/grpc/grpc cd grpc git submodule update --init --recursivemkdir -p "third_party/abseil-cpp/cmake/build" pushd "third_party/abseil-cpp/cmake/build" cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ../.. make -j4 install popdmkdir -p "third_party/cares/cares/cmake/build" pushd "third_party/cares/cares/cmake/build" cmake -DCMAKE_BUILD_TYPE=Release ../.. make -j4 install popdmkdir -p "third_party/protobuf/cmake/build" pushd "third_party/protobuf/cmake/build" cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release .. make -j4 install popdmkdir -p "third_party/zlib/cmake/build" pushd "third_party/zlib/cmake/build" cmake -DCMAKE_BUILD_TYPE=Release ../.. make -j4 install popdmkdir -p "cmake/build" pushd "cmake/build" cmake \ -DCMAKE_BUILD_TYPE=Release \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ -DgRPC_CARES_PROVIDER=package \ -DgRPC_ABSL_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ ../.. make -j4 install popdmkdir -p "examples/cpp/helloworld/cmake/build" pushd "examples/cpp/helloworld/cmake/build" cmake ../.. make popd
最后更新于