google-deepmind/lab

Bazel build error for Ubuntu 20.04.2 LTS

jw447 opened this issue · 4 comments

jw447 commented

Hi,

I encountered the following error when I tried to build the most recent 2020-12-07 release on ubuntu 20.04 with bazel v4.0.0.

(base) jon@jon-OptiPlex-3050:~/Downloads/lab-release-2020-12-07$ **bazel build -c opt //:deepmind_lab.so**
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/master.zip) = 66af5b045d30b49a61faaf063ba5da7e47b9b393e3d64b40035f66ec1ade8f34
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "66af5b045d30b49a61faaf063ba5da7e47b9b393e3d64b40035f66ec1ade8f34"
DEBUG: Repository rules_cc instantiated at:
  /home/jon/Downloads/lab-release-2020-12-07/WORKSPACE:11:13: in <toplevel>
Repository rule http_archive defined at:
  /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: SHA256 (https://github.com/abseil/abseil-cpp/archive/master.zip) = 3bdbf16bf457b270c01370595a88fae4c5be60ae1cf242dfffe832b3ec5d3d38
DEBUG: Rule 'com_google_absl' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3bdbf16bf457b270c01370595a88fae4c5be60ae1cf242dfffe832b3ec5d3d38"
DEBUG: Repository com_google_absl instantiated at:
  /home/jon/Downloads/lab-release-2020-12-07/WORKSPACE:23:13: in <toplevel>
Repository rule http_archive defined at:
  /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository jpeg_archive instantiated at:
  /home/jon/Downloads/lab-release-2020-12-07/WORKSPACE:76:13: in <toplevel>
Repository rule http_archive defined at:
  /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
**WARNING: Download from http://www.ijg.org/files/jpegsrc.v9c.tar.gz failed:** class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was 1e9793e1c6ba66e7e0b6e5fe7fd0f9e935cc697854d5737adec54d93e5b3f730 but wanted 650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
**ERROR**: An error occurred during the fetch of repository 'jpeg_archive':
   Traceback (most recent call last):
	File "/home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
		download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [http://www.ijg.org/files/jpegsrc.v9c.tar.gz] to /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/jpeg_archive/temp12295575112861601693/jpegsrc.v9c.tar.gz: Checksum was 1e9793e1c6ba66e7e0b6e5fe7fd0f9e935cc697854d5737adec54d93e5b3f730 but wanted 650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
**ERROR**: Error fetching repository: Traceback (most recent call last):
	File "/home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
		download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [http://www.ijg.org/files/jpegsrc.v9c.tar.gz] to /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/jpeg_archive/temp12295575112861601693/jpegsrc.v9c.tar.gz: Checksum was 1e9793e1c6ba66e7e0b6e5fe7fd0f9e935cc697854d5737adec54d93e5b3f730 but wanted 650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
ERROR: /home/jon/Downloads/lab-release-2020-12-07/q3map2/BUILD:54:10: //q3map2:q3map2 depends on @jpeg_archive//:jpeg in repository @jpeg_archive which failed to fetch. no such package '@jpeg_archive//': java.io.IOException: Error downloading [http://www.ijg.org/files/jpegsrc.v9c.tar.gz] to /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/jpeg_archive/temp12295575112861601693/jpegsrc.v9c.tar.gz: Checksum was 1e9793e1c6ba66e7e0b6e5fe7fd0f9e935cc697854d5737adec54d93e5b3f730 but wanted 650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
ERROR: Analysis of target '//:deepmind_lab.so' failed; build aborted: Analysis failed
INFO: Elapsed time: 11.499s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (33 packages loaded, 2137 targets configured)
    Fetching @glib_archive; fetching
    Fetching ...rchive; Extracting /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/gl\
ib_archive/temp5646751761591577341/glib-2.55.1.tar.xz
    Fetching @libxml_archive; fetching
    Fetching ...rchive; Extracting /home/jon/.cache/bazel/_bazel_jon/da5c2ed69824167a0d9ab7bef82e6435/external/li\
bxml_archive/temp18084912001669814023/libxml2-2.9.7.tar.gz

I noticed that the error essentially comes from a checksum failure of a repo called "jpeg_archive" so this is not technically an issue here. But I'm wondering if you have a fix here, or maybe a possible direction.

Thanks.

We need to fix the checksum, after someone who hopefully still has a copy of the previous archive can verify that nothing untoward was changed... unfortunately libjpeg keeps doing this where they repackage the same versioned archive, and then the checksum changes...

Hm, as far as I can tell, the current checksum does match what we say in WORKSPACE: https://github.com/deepmind/lab/blob/master/WORKSPACE#L79

(That's 1e9793e1c6ba66e7e0b6e5fe7fd0f9e935cc697854d5737adec54d93e5b3f730.)

Are you at head?

See be0f797#diff-5493ff8e9397811510e780de47c57abb70137f1afe85d1519130dc3679d60ce5.

jw447 commented

I was using 2020-12-07 release version:

https://github.com/deepmind/lab/blob/2e4c62938a00bce6331a078558a8385438c17b51/WORKSPACE#L79

I will try the master branch.

jw447 commented

The master branch works fine. I will lose the issue now, Thanks!