简体   繁体   中英

gRPC installation fails at “make”

I am following the Built From Source instructions to install grpc

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

success

$ cd grpc

success

$ git submodule update --init

success

$ make

fails after building a few source files

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

OS: Linux 4.4.0-0 SMP Debian 4.4.16-1

GCC version: gcc (Debian 4.9.2-10) 4.9.2

I couldn't find any open issues or any help about this error on the internet.

The problem seems to happen while compiling boringssl . We use the version given by $ git submodule , which at the time of this writing is be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (version_for_cocoapods_7.0-526-gbe2ee342) . Are you able to compile boringssl on its own?

You might have better luck without the embedded BoringSSL. Try building with:

EMBED_OPENSSL=false make

If you get errors about missing packages, make sure you have libssl-dev installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM