linux - 在 Ubuntu 3.13.0-163-generic 上构建 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
现在可以提供不好的结果。
推荐阅读
- python - ImportError:无法导入名称“deserialize_keras_object”
- javascript - 如何将多张图片上传到 sanity.io?
- python - 在 Eclipse IDE 中编写 python 代码时,有没有办法不连续进行新的启动配置?
- go - Golang 语法错误:赋值不匹配:4 个变量但 2 个值
- java - 如何传递给控制器方法请求体?
- node.js - Mongoose 深填充虚拟字段
- python - 使用 PDFminer (python) 在 PDF 中查找正则表达式不起作用
- latex - 在 Latex 中显示数据库示例 - 样式在 Stackoverflow 中
- javascript - 函数对象,“长度属性”
- highcharts - Highcharts - 捏缩放不适用于具有多个 y 轴的图表