Thanks for reply. Adding "--incompatible_remove_native_git_repository=false" causes different failure message:
$ bazel build ... --incompatible_remove_native_git_repository=false
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 9607a197-2aab-4f3c-bb5e-aa7c40ae7846
ERROR: /home/xiaodhu/workspace/roughtime/BUILD:71:1: Traceback (most recent call last):
File "/home/xiaodhu/workspace/roughtime/BUILD", line 71
cc_proto_library(name = "config_proto", srcs = ["co..."], <2 more arguments>)
File "/home/xiaodhu/.cache/bazel/_bazel_xiaodhu/af8d6060d2fe231bad16963319afb52b/external/protobuf/protobuf.bzl", line 229, in cc_proto_library
cc_libs += [default_runtime]
trying to mutate a frozen object
ERROR: package contains errors:
ERROR: error loading package '': Package '' contains errors
INFO: Elapsed time: 26.196s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded)