os: centos-7.6
when run
tools/run_in_docker.sh bazel build -c opt tensorflow_serving/...
failed.
ERROR
ERROR: /root/abc/serving/.cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/com_google_protobuf/BUILD:148:1: no such package '@zlib//': The repository '@zlib' could not be resolved and referenced by '@com_google_protobuf//:protobuf'
ERROR: Analysis of target '//tensorflow_serving/util:class_registration_test_proto_genproto' failed; build aborted: no such package '@zlib//': The repository '@zlib' could not be resolved
INFO: Elapsed time: 4.944s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (47 packages loaded, 426 targets configured)
currently loading: @org_tensorflow//tensorflow/core
Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary?
Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in the Github new issue template.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!
Compare a lot of BUILD files with "@zlib" in .cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/ directory, just modify the file /root/abc/serving/.cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/com_google_protobuf/BUILD by “ZLIB_DEPS = ["@zlib//:zlib"]” to ZLIB_DEPS = ["@zlib_archive//:zlib"]
I don't know why, but work
Compare a lot of BUILD files with "@zlib" in .cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/ directory, just modify the file /root/abc/serving/.cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/com_google_protobuf/BUILD by “ZLIB_DEPS = ["@zlib//:zlib"]” to ZLIB_DEPS = ["@zlib_archive//:zlib"]
I don't know why, but work
@luduling thans. it's works for me.
This should be fixed now.
This should be fixed now.
@nrobeR I met the sample problem. Not yet fixed?
Compare a lot of BUILD files with "@zlib" in .cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/ directory, just modify the file /root/abc/serving/.cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/com_google_protobuf/BUILD by “ZLIB_DEPS = ["@zlib//:zlib"]” to ZLIB_DEPS = ["@zlib_archive//:zlib"]
I don't know why, but work
this works for me.
Today i have a same problem
I builind from docker (GCP Ubuntu 18.04 Host) with this command tools/run_in_docker.sh bazel build -c opt tensorflow_serving/...
I think since August this issue not fixed
same ☝️
I also have the same error, @badele did you already solve this problem?
@chengnignzhang After spending some days, I gave up :)
Did anybody found a solution for this issue?
I'm using Bazel and I'm getting /59500ca4bca19b28deb1169ec76b1fab/external/com_google_protobuf/BUILD:148:1: no such package '@zlib//': The repository '@zlib' could not be resolved and referenced by '@com_google_protobuf//:protobuf'
@chengnignzhang @edias
I switched to tensorflow 2.0 I no longer have a build problem now :)
@badele I'm on TF 2.0 but still fails, yet @luduling 's solution still works.
I was trying to build tensorflow/serving 1.15 from the source (with a custom operation). Ran into the same issue but there seems to be a fix, here's what I did:
r1.15 and the build failed with this error.diff -r. They are identical, the only difference is the .git contained in the original github repo but not in the unzipped source code..git from the repo and the build succeeded.It's super weird and I have no idea what's going on but it might be helpful :)
Most helpful comment
Compare a lot of BUILD files with "@zlib" in .cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/ directory, just modify the file /root/abc/serving/.cache/_bazel_root/2d09b9f1da03dc789cd67b59a4571350/external/com_google_protobuf/BUILD by “ZLIB_DEPS = ["@zlib//:zlib"]” to ZLIB_DEPS = ["@zlib_archive//:zlib"]
I don't know why, but work