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

Building from source error: The repository '@zlib' could not be resolved #1406

Closed
wangzhilong opened this issue Aug 1, 2019 · 13 comments
Closed

Comments

@wangzhilong
Copy link

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
@rmothukuru
Copy link

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!

@luduling
Copy link

luduling commented Aug 1, 2019

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

@wangzhilong
Copy link
Author

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.

@nrobeR
Copy link
Contributor

nrobeR commented Aug 2, 2019

This should be fixed now.

@gzpyy
Copy link

gzpyy commented Sep 29, 2019

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.

@badele
Copy link

badele commented Oct 3, 2019

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

@o-90
Copy link

o-90 commented Oct 28, 2019

same ☝️

@chengnignzhang
Copy link

I also have the same error, @badele did you already solve this problem?

@badele
Copy link

badele commented Dec 5, 2019

@chengnignzhang After spending some days, I gave up :)

@edias
Copy link

edias commented Jan 6, 2020

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'

@badele
Copy link

badele commented Jan 13, 2020

@chengnignzhang @edias
I switched to tensorflow 2.0 I no longer have a build problem now :)

@372046933
Copy link

@badele I'm on TF 2.0 but still fails, yet @luduling 's solution still works.

@caren-guo
Copy link

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:

  1. I cloned this repo and checked out to r1.15 and the build failed with this error.
  2. Instead, I downloaded the source code from https://github.com/tensorflow/serving/archive/1.15.0.tar.gz and I'm not seeing this error.
  3. I compared the above two directories by diff -r. They are identical, the only difference is the .git contained in the original github repo but not in the unzipped source code.
  4. I removed .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 :)

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

No branches or pull requests