Bazel could not download grpc

Hello,

I was following the nstalltion guide for IsaaC and was trying to compile the first example, namely stereo_dummy, with bazel. Nevertheless, bazel failed because the url https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.19.1.tar.gz returned 404. I checked the link and the specified key for grpc does not exists.

Does anyone have an idea how I could circumvent the issue? I’m able to download grpc from github via https://github.com/grpc/grpc/archive/v1.19.1.tar.gz

Thank you!

My console log:

bazel build --verbose_failures //apps/samples/stereo_dummy

Loading:
Loading: 0 packages loaded
WARNING: Download from https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.19.1.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
Analyzing: target //apps/samples/stereo_dummy:stereo_dummy (0 packages loaded, 0 targets configured)
DEBUG: Rule 'isaac_assets' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "032d56b65d17acf360cab1145e57cdeb0a0d2e25814624a90d44766e624e40f1"
DEBUG: Call stack for the definition of repository 'isaac_assets' which is a http_archive (rule definition at /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/jlange/isaac/engine/build/isaac.bzl:425:9
 - /home/jlange/isaac/engine/build/isaac.bzl:432:5
 - /home/jlange/isaac/third_party/engine.bzl:317:5
 - /home/jlange/isaac/WORKSPACE:19:1
INFO: Analyzed target //apps/samples/stereo_dummy:stereo_dummy (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:151:1: Couldn't build file external/capnproto/_objs/capnpc/lexer.capnp.o: undeclared inclusion(s) in rule '@capnproto//:capnpc':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/compiler/lexer.capnp.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:151:1: Couldn't build file external/capnproto/_objs/capnpc/error-reporter.o: undeclared inclusion(s) in rule '@capnproto//:capnpc':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/compiler/error-reporter.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:151:1: Couldn't build file external/capnproto/_objs/capnpc/type-id.o: undeclared inclusion(s) in rule '@capnproto//:capnpc':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/compiler/type-id.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/redis/BUILD.bazel:64:1: Couldn't build file external/redis/_objs/linenoise/linenoise.o: undeclared inclusion(s) in rule '@redis//:linenoise':
this rule is missing dependency declarations for the following files included by 'external/redis/deps/linenoise/linenoise.c':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdarg.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:151:1: Couldn't build file external/capnproto/_objs/capnpc/grammar.capnp.o: undeclared inclusion(s) in rule '@capnproto//:capnpc':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/compiler/grammar.capnp.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:20:1: Couldn't build file external/capnproto/_objs/kj_lite/memory.o: undeclared inclusion(s) in rule '@capnproto//:kj_lite':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/kj/memory.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'

[...]

Target //apps/samples/stereo_dummy:stereo_dummy failed to build
INFO: Elapsed time: 35.280s, Critical Path: 15.72s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Website response:

<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
</Error>

One way to work around it is to re-try. It should resolve this glitch. Please let us know if by retrying you still have issue?

Hi, @johann.lange ,

GRPC is actually hosted on Github by Google, which may break occasionally. It would load from secondary URL and keep going.

Reading the error message, actually it is failing to build capnp.
I am wondering if you are using Ubuntu 18.04 LTS and have all dependencies installed.

Hi @yangl,

thank you for the feedback!

I’m indeed running 18.04:

lsb_release --all
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

I’ve rerun the install_dependencies.sh script and according to the output, everything is installed correctly.
Is there a way no manually (re-)install capnp? I checked and I have installed pycapnp 0.6.4 for both python and python3. Still, I cannot successfully build bazel apps:

INFO: Analyzed target //apps/samples/stereo_dummy:stereo_dummy (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:88:1: Couldn't build file external/capnproto/_objs/capnp_lite/blob.o: undeclared inclusion(s) in rule '@capnproto//:capnp_lite':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/blob.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/redis/BUILD.bazel:77:1: Couldn't build file external/redis/_objs/redis-server-lib/adlist.o: undeclared inclusion(s) in rule '@redis//:redis-server-lib':
this rule is missing dependency declarations for the following files included by 'external/redis/src/adlist.c':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdarg.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:88:1: Couldn't build file external/capnproto/_objs/capnp_lite/c++.capnp.o: undeclared inclusion(s) in rule '@capnproto//:capnp_lite':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/c++.capnp.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:88:1: Couldn't build file external/capnproto/_objs/capnp_lite/json.capnp.o: undeclared inclusion(s) in rule '@capnproto//:capnp_lite':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/compat/json.capnp.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/redis/BUILD.bazel:77:1: Couldn't build file external/redis/_objs/redis-server-lib/dict.o: undeclared inclusion(s) in rule '@redis//:redis-server-lib':
this rule is missing dependency declarations for the following files included by 'external/redis/src/dict.c':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdarg.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/syslimits.h'
ERROR: /home/jlange/.cache/bazel/_bazel_jlange/101ed2b189fc941722b9db006cd9bcb5/external/capnproto/BUILD.bazel:88:1: Couldn't build file external/capnproto/_objs/capnp_lite/any.o: undeclared inclusion(s) in rule '@capnproto//:capnp_lite':
this rule is missing dependency declarations for the following files included by 'external/capnproto/c++/src/capnp/any.c++':
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h'
  '/usr/lib/gcc/x86_64-linux-gnu/6/include/stdint.h'

[...]

Hi @atorabi,

I’ve rerun the install_dependencies.sh script, and now the download works.
Nevertheless, I cannot be 100 % sure, that this fixed it.