weird bazel fetch error with zlib

573 views
Skip to first unread message

amit....@gmail.com

unread,
Nov 24, 2016, 10:28:56 PM11/24/16
to bazel-discuss
Hello All,

I am trying to build tensorflow serving on my RHEL 6.6 box and running into a very weird error while executing the serving/tensorflow/configure script.

The error is:
ERROR: /home/aiyadav/amit/code/serving/tensorflow/tensorflow/core/BUILD:970:1: no such package '@zlib_archive//': Downloaded file at /home/aiyadav/.cache/bazel/_bazel_aiyadav/1e6dddefa2cd632ca5e1ebf40acc0c30/external/zlib_archive/zlib-1.2.8.tar.gz has SHA-256 of 2a0dd0894c35b8736ff2bee925aab35b473a6c6b432b25e56442bacb0e72bc3a, does not match expected SHA-256 (36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d) and referenced by '//tensorflow/core:lib_internal'.

I did some digging around and this is what I found:

1. 'bazel fetch //tensorflow/...' command is being executed. This command brings in all the external dependencies.
2. The external dependencies are defined in the 'serving/tensorflow/tensorflow/workspace.bzl' file.
3. The dependencies definition contains a SHA1-256 checksum of the files.
4. It appears that bazel downloads the dependencies.tar.gz file (e.g. zlib-1.2.8.tar.gz or swig-3.0.8.tar.gz), computes SHA1-256 on the file and compare it with the one defined in the workspace.bzl file.
5. For some reason, only for the zlib-1.2.8.tar.gz file the fetch is unzipping the file and putting the tar file in the bazel cache without removing the .gz version. This is causing the SHA1-256 checksum of the zlib-1.2.8.tar file to be compared with the zlib-1.2.8.tar.gz file from workplace.bzl and the error above.
6. This is not happening for any other dependency, only zlib-1.2.8.

Wondering if anybody has any pointers to solve this issue. This is definitely related by env as on another ubuntu machine I have, I don't see any issues.

Thanks,

Brian Silverman

unread,
Nov 25, 2016, 12:42:04 AM11/25/16
to amit....@gmail.com, bazel-discuss
That is a weird error. I don't have any experience with tensorflow, but this sounds like something Bazel is doing wrong. I can't reproduce it, so on to questions and ideas:

What version of Bazel are you using? What JDK are you using?

If you remove the zlib-1.2.8.tar.gz file and run the fetch again (after a `bazel shutdown`), does Bazel put it back? Where exactly are you finding the zlib-1.2.8.tar file?

You say only zlib is doing this, but bazel tends to stop as soon as it sees one error. Does `bazel fetch //tensorflow/... --keep_going` hit any more similar errors? When I try it, I get various issues with //tensorflow/tools/git, which looks kind of like it gets generated, so I'm pretty sure those aren't relevant.

Is there any proxy/firewall/etc configuration on the machine it doesn't work that might be relevant? Does `wget http://zlib.net/zlib-1.2.8.tar.gz` download a file named zlib-1.2.8.tar.gz as expected?



--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/c15812b5-6574-4fdb-93db-2fc40cc03abc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitry Lomov

unread,
Nov 25, 2016, 6:00:09 AM11/25/16
to Brian Silverman, amit....@gmail.com, bazel-discuss
This is https://github.com/bazelbuild/bazel/issues/2136, being fixed as we speak.


For more options, visit https://groups.google.com/d/optout.



--
Google Germany GmbH
Erika-Mann-Straße 33, 80636 München, Germany
Reply all
Reply to author
Forward
0 new messages