linux - 在 Ubuntu 3.13.0-163-generic 上构建 GRPC 编译失败

标签 linux grpc

我正在使用 make 从源代码在 ubunut 3.13.0-163-generic 中构建 GRPC。我收到以下错误:

[GRPC]    Generating gRPC's protobuf service CC file from src/proto/grpc/channelz/channelz.proto
[libprotobuf FATAL google/protobuf/generated_message_util.cc:794] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
--grpc_out: protoc-gen-grpc: Plugin killed by signal 6.
make: *** [/home/iadk/gokul/grcpcpp/grpc/gens/src/proto/grpc/channelz/channelz.grpc.pb.cc] Error 1

为什么 GPRC 编译失败,我该如何解决?

最佳答案

Ubuntu 3.13.0-163-generic:那就是 Ubuntu 14.04。默认的 gcc 4.8 因 GRPC 而失败。下载gcc48-c++_4.8.4-2ubuntu14_amd64.deb https://drive.google.com/drive/folders/1xVEATaYAwqvseBzYxKDzJoZ4-Hc_XOJm?usp=sharing ... Ubuntu gcc 4.8 打了 163 个补丁。 gcc48-c++_4.8.4-2ubuntu14:无。

安装编译器

$ sudo gdebi Downloads/gcc48-c++_4.8.4-2ubuntu14_amd64.deb

GRPC

$ sudo apt-get install g++ make autoconf libtool pkg-config libgflags-dev libgtest-dev

$ git clone https://github.com/grpc/grpc.git
$ cd grpc/
$ git submodule update --init

将 Makefile 编辑为 gcc48、g++48 ... 第 50 - 55 行:

DEFAULT_CC = gcc48
DEFAULT_CXX = g++48
else
ifeq ($(HAS_GCC),true)
DEFAULT_CC = gcc48
DEFAULT_CXX = g++48

grpc/:

$ make          // no errors
$ sudo make install

注意:git clone https://github.com/grpc/grpc.git 很重要。原中提到的“curl”命令 grpc/BUILDING.md 现在可以提供不好的结果。

关于linux - 在 Ubuntu 3.13.0-163-generic 上构建 GRPC 编译失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57944560/

相关文章:

c# - ASP.NET Core 5 Blazor WASM、gRPC、Entity Framework Core 5 : many-to-many results in stack overflow

.net-core - 没有 ASP.Net 的 grpc-dotnet 服务器

c# - 尝试为c#实现gRPC单元测试

java - 在锁定 tomcat 临时文件夹的情况下配置 Glowroot 显示以下异常

java - 在 Eclipse RCP 应用程序中捕获终止信号

python - 在 ipython 中执行 `ls` 时如何修复 PermissionError?

python - 使用 Linux 重定向从 Python 脚本覆盖文件

c++ - 在 gRPC 中使用 UDP

c - 错误 : function declared as function returning function

linux - 单线程 Java 应用程序启动超过 70 个线程