-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 import brpc build failed #1378
Comments
update: (base) [ /tmp/test_brpc]$ ls skylib_version = "0.8.0" http_archive( http_archive( bind( http_archive( http_archive( http_archive( new_local_repository( new_local_repository( bind( bind( new_local_repository( |
closed, reopen if you have further ideas. |
Describe the bug (描述bug)
bazel 引入brpc失败
单独在brpc项目里面 bazel build ...编译成功
但是在单独的项目里面通过workspace引入brpc失败
To Reproduce (复现方法)
见附件
Expected behavior (期望行为)
bazel能通过workspace引入brpc
Versions (各种版本)
OS: centos7
Compiler: gcc version 7.3.1 20180303 (Red Hat 7.3.1-6) (GCC)
brpc: master
protobuf: libprotoc 3.12.3
bazel:bazel 1.1.0
Additional context/screenshots (更多上下文/截图)
(base) [ /tmp/test_brpc]$ cat test.cpp
#include
int main() {
return 0;
}
(base) [ /tmp/test_brpc]$ cat BUILD
package(default_visibility = ["//visibility:public"])
cc_binary(
name = "test_server",
linkopts = [
"-ldl",
],
deps = [
":test_service",
],
)
cc_library(
name = "test_service",
srcs = [“test.cpp”],
visibility = [
"//visibility:public",
],
deps = [
"@brpc_cpp//:brpc",
],
)
(base) [ /tmp/test_brpc]$ cat WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')
git_repository(
name = "brpc_cpp",
remote = "https://github.com/apache/incubator-brpc.git",
branch = "master",
)
(base) [ /tmp/test_brpc]$ bazel build ...
INFO: Writing tracer profile to '/.../4bbabbdb1156dfbb9355920322dd01b1/command.profile.gz'
DEBUG: Rule 'brpc_cpp' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "b3a948c9dca29632b3367529488e070852e31f11", shallow_since = "1617642087 +0200" and dropping ["branch"]
DEBUG: Call stack for the definition of repository 'brpc_cpp' which is a git_repository (rule definition at /.../4bbabbdb1156dfbb9355920322dd01b1/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
ERROR: /tmp/test_brpc/BUILD:13:1: error loading package '@brpc_cpp//': in /.../4bbabbdb1156dfbb9355920322dd01b1/external/brpc_cpp/bazel/brpc.bzl: Unable to find package for @com_google_protobuf//:protobuf.bzl: The repository '@com_google_protobuf' could not be resolved. and referenced by '//:test_service'
ERROR: Analysis of target '//:test_server' failed; build aborted: error loading package '@brpc_cpp//': in /.../4bbabbdb1156dfbb9355920322dd01b1/external/brpc_cpp/bazel/brpc.bzl: Unable to find package for @com_google_protobuf//:protobuf.bzl: The repository '@com_google_protobuf' could not be resolved.
INFO: Elapsed time: 0.101s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
(base) [/tmp/test_brpc]$ ls
BUILD WORKSPACE test.cpp
The text was updated successfully, but these errors were encountered: