【问题标题】:gRPC installation fails at "make"gRPC 安装在“make”时失败
【发布时间】:2017-11-29 00:54:43
【问题描述】:

我正在关注Built From Source instructions 来安装grpc

$ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc

成功

$ cd grpc

成功

$ git submodule update --init

成功

$ make

构建几个源文件后失败

third_party/boringssl/crypto/rand/urandom.c:62:2: error: #error "system call number for getrandom is not the expected value"
#error "system call number for getrandom is not the expected value"
 ^
In file included from /usr/include/x86_64-linux-gnu/sys/syscall.h:31:0,
from third_party/boringssl/crypto/rand/urandom.c:32:
third_party/boringssl/crypto/rand/urandom.c: In function ‘init_once’:
third_party/boringssl/crypto/rand/urandom.c:128:15: error: ‘__NR_getrandom’ undeclared (first use in this function)
syscall(SYS_getrandom, &dummy, sizeof(dummy), GRND_NONBLOCK);
         ^
third_party/boringssl/crypto/rand/urandom.c:128:15: note: each undeclared identifier is reported only once for each function it appears in
third_party/boringssl/crypto/rand/urandom.c: In function ‘fill_with_entropy’:
third_party/boringssl/crypto/rand/urandom.c:258:21: error: ‘__NR_getrandom’ undeclared (first use in this function)
r = syscall(SYS_getrandom, out, len, 0 /* no flags */);
            ^
Makefile:2564: recipe for target '/home/usrnm/grpc/objs/opt/third_party/boringssl/crypto/rand/urandom.o' failed
make: *** [/home/usrnm/grpc/objs/opt/third_party/boringssl/crypto/rand/urandom.o] Error 1

操作系统:Linux 4.4.0-0 SMP Debian 4.4.16-1

GCC 版本:gcc (Debian 4.9.2-10) 4.9.2

我在互联网上找不到任何未解决的问题或有关此错误的任何帮助。

【问题讨论】:

    标签: c++ protocol-buffers grpc


    【解决方案1】:

    如果没有嵌入式 BoringSSL,您可能会有更好的运气。尝试构建:

    EMBED_OPENSSL=false make
    

    如果您收到有关缺少软件包的错误,请确保您已安装 libssl-dev

    【讨论】:

      【解决方案2】:

      编译 boringssl 时似乎出现了问题。我们使用$ git submodule 给出的版本,在撰写本文时为be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (version_for_cocoapods_7.0-526-gbe2ee342)。你能自己编译boringssl吗?

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-11-05
        • 2018-06-06
        • 2020-06-08
        • 2020-03-15
        • 2012-02-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多