Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel build fails with error #2

Open
jyothri opened this issue Feb 6, 2019 · 1 comment
Open

bazel build fails with error #2

jyothri opened this issue Feb 6, 2019 · 1 comment

Comments

@jyothri
Copy link

jyothri commented Feb 6, 2019

grpc-java-bazel-example $ bazel build //...     
INFO: Invocation ID: 86dbbe4c-d4e8-46c6-a408-773079bc0112
ERROR: /private/var/tmp/_bazel_jkurapati/de64285080fc73ca555b84cca93e12ec/external/com_google_protobuf/BUILD:573:1: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_jkurapati/de64285080fc73ca555b84cca93e12ec/external/com_google_protobuf/BUILD", line 573
		internal_gen_well_known_protos_java(srcs = WELL_KNOWN_PROTOS)
	File "/private/var/tmp/_bazel_jkurapati/de64285080fc73ca555b84cca93e12ec/external/com_google_protobuf/protobuf.bzl", line 269, in internal_gen_well_known_protos_java
		Label(("%s//protobuf_java" % REPOSITOR...))
	File "/private/var/tmp/_bazel_jkurapati/de64285080fc73ca555b84cca93e12ec/external/com_google_protobuf/protobuf.bzl", line 269, in Label
		REPOSITORY_NAME
The value 'REPOSITORY_NAME' has been removed in favor of 'repository_name()', please use the latter (https://docs.bazel.build/versions/master/skylark/lib/native.html#repository_name). You can temporarily allow the old name by using --incompatible_package_name_is_a_function=false
ERROR: /private/var/tmp/_bazel_jkurapati/de64285080fc73ca555b84cca93e12ec/external/com_google_protobuf/BUILD:355:1: Target '@com_google_protobuf//:android' contains an error and its package is in error and referenced by '@com_google_protobuf//:protoc'
ERROR: /private/var/tmp/_bazel_jkurapati/de64285080fc73ca555b84cca93e12ec/external/com_google_protobuf/BUILD:355:1: Target '@com_google_protobuf//:msvc' contains an error and its package is in error and referenced by '@com_google_protobuf//:protoc'
ERROR: /Users/jkurapati/Documents/working/workspace/grpc-java-bazel-example/src/main/proto/BUILD:16:1: every rule of type _gensource implicitly depends upon the target '@com_google_protobuf//:protoc', but this target could not be found because of: Target '@com_google_protobuf//:protoc' contains an error and its package is in error
ERROR: Analysis of target '//src/main/proto:helloworld_java_grpc__do_not_reference__srcjar' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.275s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 3 targets configured)
    currently loading: @bazel_tools//tools/jdk
➜  grpc-java-bazel-example $

My version of bazel

Build label: 0.21.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Dec 19 12:57:09 2018 (1545224229)
Build timestamp: 1545224229
Build timestamp as int: 1545224229

Please let me know if you want any more info

@jyothri
Copy link
Author

jyothri commented Feb 6, 2019

Workaround is to run bazel build --incompatible_package_name_is_a_function=false //...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant