tensorflow: http://zlib.net/zlib-1.2.8.tar.gz no longer available

I’m attempting to install tensorflow 0.12.1 from the r0.12 branch from source.

zlib has been updated from 1.2.8 to 1.2.9 so it appears the link must be updated from: http://zlib.net/zlib-1.2.8.tar.gz

edit: per later comments, this has been moved to http://zlib.net/fossils/zlib-1.2.8.tar.gz

one solution may be to update to: ~~http://zlib.net/zlib-1.2.9.tar.gz~~

here is the error I’m getting:

INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
........
ERROR: /home/ahundt/src/tensorflow/tensorflow/core/BUILD:970:1: no such package '@zlib_archive//': Error downloading [http://zlib.net/zlib-1.2.8.tar.gz] to /home/ahundt/.cache/bazel/_bazel_ahundt/beca172f341045bf57b6baf5296669b3/external/zlib_archive/zlib-1.2.8.tar.gz: GET returned 404 Not Found and referenced by '//tensorflow/core:lib_internal'.
ERROR: /home/ahundt/src/tensorflow/tensorflow/core/BUILD:970:1: no such package '@zlib_archive//': Error downloading [http://zlib.net/zlib-1.2.8.tar.gz] to /home/ahundt/.cache/bazel/_bazel_ahundt/beca172f341045bf57b6baf5296669b3/external/zlib_archive/zlib-1.2.8.tar.gz: GET returned 404 Not Found and referenced by '//tensorflow/core:lib_internal'.
ERROR: Evaluation of query "deps((//tensorflow/... union @bazel_tools//tools/jdk:toolchain))" failed: errors were encountered while computing transitive closure.

In addition to the breakage fix, perhaps it would also make sense to make a change that would prevent future breakage of this sort?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 13
  • Comments: 17 (5 by maintainers)

Commits related to this issue

Most upvoted comments

This fix does not work for me. Instead, both zlib-1.2.8.tar.gz and zlib-1.2.9.tar.gz are moved under http://zlib.net/fossils/ So it needs to be

native.new_http_archive(
      name = "zlib_archive",
      url = "http://zlib.net/fossils/zlib-1.2.8.tar.gz",
      sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d",
      strip_prefix = "zlib-1.2.8",
      build_file = str(Label("//third_party:zlib.BUILD")),
)

For those wanderers with the same problem it can be fixed changing tensorflow/tensorflow/workspace.bzl from

native.new_http_archive(
      name = "zlib_archive",
      url = "http://zlib.net/zlib-1.2.8.tar.gz",
      sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d",
      strip_prefix = "zlib-1.2.8",
      build_file = str(Label("//third_party:zlib.BUILD")),
)

To

native.new_http_archive(
      name = "zlib_archive",
      url = "http://zlib.net/zlib-1.2.9.tar.gz",
      sha256 = "73ab302ef31ed1e74895d2af56f52f5853f26b0370f3ef21954347acec5eaa21",
      strip_prefix = "zlib-1.2.9",
      build_file = str(Label("//third_party:zlib.BUILD")),
)

Simple fix that has been working for me for days:

  • edit tensorflow/workspace.bzl
  • replace zlib-1.2.8 with zlib-1.2.10
  • remove the sha256 line

or use this patch:

diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
index 06e16cd..7c7b44c 100644
--- a/tensorflow/workspace.bzl
+++ b/tensorflow/workspace.bzl
@@ -228,9 +228,8 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
 
   native.new_http_archive(
     name = "zlib_archive",
-    url = "http://zlib.net/zlib-1.2.8.tar.gz",
-    sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d",
-    strip_prefix = "zlib-1.2.8",
+    url = "http://zlib.net/zlib-1.2.10.tar.gz",
+    strip_prefix = "zlib-1.2.10",
     build_file = str(Label("//:zlib.BUILD")),
   )

Thanks @Omnipresent

After applying your edit to workspace.bzl,I got: Prefix zlib-1.2.8 was given, but not found in the archive and referenced by ‘//tensorflow/core:lib_internal’.

Changing the entry as follows worked for me:

    native.new_http_archive(
        name = "zlib_archive",
        url = "http://zlib.net/fossils/zlib-1.2.10.tar.gz",
        strip_prefix = "zlib-1.2.10",
        build_file = str(Label("//:zlib.BUILD")),
    )

I am using TFAMI.v3 (ami-52bb0c32)

As already noted, all of the versions are in http://zlib.net/fossils/ , including the current version.

Suggested options for a permanent fix:

  1. The github release could be used for the relevant files, which @madler of zlib himself conveniently provides https://github.com/madler/zlib/releases, perhaps releases here can be consistently expected in the future?
  2. propose to zlib that they have a permalink available on zlib.net (or find/switch to it if it already exists)
  3. As the stewards of tensorflow, I assume google has, and they may want to use their own googley options and may want to use them. 😃
  4. Enable or make use of existing support for check more than one url location for redundancy which should be safe if the hash is correct and secure (i.e. provide both the normal http://zlib.net/zlib-1.2.8.tar.gz and fossils http://zlib.net/fossils/zlib-1.2.8.tar.gz path, and maybe even the github https://github.com/madler/zlib/archive/v1.2.8.tar.gz one too)
  5. option to be avoided: increment releases automatically (would likely eventually cause many people pain similar to this issue if there was an unexpected regression or breakage)
  6. ?
  7. Profit!

😃

The below works. Thanks @ahundt for updating the edit

  native.new_http_archive(
    name = "zlib_archive",
    url = "http://zlib.net/fossils/zlib-1.2.10.tar.gz",
    strip_prefix = "zlib-1.2.8",
    build_file = str(Label("//:zlib.BUILD")),
  )