(cd /private/var/tmp/_bazel_rohit/a10731376421707628e091029859af4a/beam && \
exec env - \
PATH='<snip>' \
TMPDIR=/var/folders/p2/yz_3gtqd4z9d15l2ptzcjbsm0000gn/T/ \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/external/protobuf_repo/protoc --java_out=bazel-out/local_darwin-fastbuild/genfiles/external/protobuf_repo/wellknown.jar -Isrc external/protobuf_repo/src/google/protobuf/any.proto external/protobuf_repo/src/google/protobuf/api.proto external/protobuf_repo/src/google/protobuf/compiler/plugin.proto external/protobuf_repo/src/google/protobuf/descriptor.proto external/protobuf_repo/src/google/protobuf/duration.proto external/protobuf_repo/src/google/protobuf/empty.proto external/protobuf_repo/src/google/protobuf/field_mask.proto external/protobuf_repo/src/google/protobuf/source_context.proto external/protobuf_repo/src/google/protobuf/struct.proto external/protobuf_repo/src/google/protobuf/timestamp.proto external/protobuf_repo/src/google/protobuf/type.proto external/protobuf_repo/src/google/protobuf/wrappers.proto && mv bazel-out/local_darwin-fastbuild/genfiles/external/protobuf_repo/wellknown.jar bazel-out/local_darwin-fastbuild/genfiles/external/protobuf_repo/wellknown.srcjar')
ERROR: /private/var/tmp/_bazel_rohit/a10731376421707628e091029859af4a/external/protobuf_repo/BUILD:461:1: Couldn't build file external/protobuf_repo/wellknown.srcjar: Executing genrule @protobuf_repo//:gen_well_known_protos_java failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
src: warning: directory does not exist.
external/protobuf_repo/src/google/protobuf/any.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
The warning has the clue, and if I were to replace the import path (-Isrc) with -Iexternal/protobuf_repo/src. Is there an equivalent of bazel workspace_root that can be used for the cmd in this genrule in protobuf/BUILD?
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAM01fBrV2W%2BSoTjaLkkU014LRcQzdTBMO_%2Be3xhm39x7dvEGaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.