Closed nelhage closed 8 years ago
I'll start investigating this in docker. What's your environment?
Linux, Ubuntu 14.04 Xenial, running bazel 0.3.1 from the official apt repository
Sorry, I think https://github.com/grpc/grpc/issues/6083 may be the more relevant issue, but in either case the query of whether there's a minimally-invasive workaround stands. Thanks for looking into it!
Currently compiles fine on debian/jessie but failing as you report on Ubuntu Xenial 16.04 and Trusty 14.04 on GCE. Current (unsatisfactory) workaround is to use debian.
However, the travis-ci "mega" image that tests this repo is based on Ubuntu 14.04 with what seems like pretty standard gcc-4.8 install via update-alternatives from https://github.com/travis-ci/travis-cookbooks/tree/3e0e60d2e996563223fceb2e9ad98f2c68b33b43/cookbooks/gcc.
Maybe @nicolasnoble or @yang-g has insight on this, or perhaps https://github.com/grpc/grpc/pull/6851 will fix?
That's fascinating and pretty confusing, and suggests gcc-4.8 vs. 5.x as the possible culprit, although I'm struggling to figure out how that could affect this. But it does give me something to dig into. I'll report back if I uncover anything.
Ah-ha, I think I figure it out. It's a sandbox thing. The build will work if the sandbox is disabled (which it is in travis), and I'm guessing your jessie doesn't support the sandbox for some reason.
The grpc
checkout includes third_party/nanopb
, so the files are available from that path, but because //external:nanopb
is bound elsewhere, there isn't a declared dependency there. So with sandbox enforcing, bazel doesn't bring those files into the sandbox, and the compiler can't find it. With the sandbox disabled, the compiler picks them up even though they're undeclared.
That at least gives me a workaround for the moment. I'm hopeful that grpc/grpc#6851 will fix properly.
Nice pickup about the sandbox! I've added a note on the README.md about this. Will keep this issue open for now.
If I try to build a simple
cc_proto_library
with GRPC support (I'm copy-pasting the example frombzl/cpp/README.md
, the build fails because thecom_github_grpc_grpc
build fails:I believe this is a symptom of https://github.com/grpc/grpc/issues/6728 but is there some workaround that allows this repository to work? I could vendor
nanopb
into my ownthird_party
directory, but (a) that's fairly dissatisfying and (b) I'm not clear I won't run into other failures.