tensorflow: An error occurred during the fetch of repository 'llvm-project':

Click to expand!

Issue Type

Build/Install

Source

source

Tensorflow Version

2.4.1

Custom Code

Yes

OS Platform and Distribution

Linux Ubuntu 20.04

Mobile device

No response

Python version

3.8

Bazel version

3.1.0

GCC/Compiler version

9.4.0

CUDA/cuDNN version

11.6/8

GPU model and memory

RTX3080

Current Behaviour?

Bazel-build code fails when trying to retrieve llvm source code. 

Download from primary fails with 404: 
https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/f402e682d0ef5598eeffc9a21a691b03e602ff58.tar.gz

Download from secondary fails with 504:
https://github.com/llvm/llvm-project/archive/f402e682d0ef5598eeffc9a21a691b03e602ff58.tar.gz

Standalone code to reproduce the issue

https://github.com/tensorflow/tensorflow/archive/v2.4.1.tar.gz

Relevant log output

ERROR: An error occurred during the fetch of repository 'llvm-project':
   java.io.IOException: Error downloading [https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/f402e682d0ef5598eeffc9a21a691b03e602ff58.tar.gz, https://github.com/llvm/llvm-project/archive/f402e682d0ef5598eeffc9a21a691b03e602ff58.tar.gz] to /home/dgu/.cache/bazel/_bazel_dgu/bbb96d26b2548d6cbb28158a8986fc7d/external/llvm-project/f402e682d0ef5598eeffc9a21a691b03e602ff58.tar.gz: Read timed out

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (9 by maintainers)

Commits related to this issue

Most upvoted comments

We (Open-CE team) are also facing the same problem since yesterday. I can’t build TF 2.8 and TF 2.9.1 due to this. .zip format is being downloaded but not .tar.gz format. The recent commits of llvm-project are being downloaded in .tar.gz format. I’d raised these two issues -

  1. https://github.com/llvm/llvm-project/issues/56177
  2. https://support.github.com/ticket/personal/0/1681014

Patching workspacebzl file as mentioned in one of the comments works. This issue is seen even with tensorflow-text and tensorflow-serving builds. So, we would need to patch all of these packages of previous release and re-tag.

Clarifying my earlier comment, here is a patch that can be used to work around this issue:

diff --git a/third_party/llvm/workspace.bzl b/third_party/llvm/workspace.bzl
index 82d0f71ccbd..6a5cd8e61b5 100644
--- a/third_party/llvm/workspace.bzl
+++ b/third_party/llvm/workspace.bzl
@@ -5,15 +5,14 @@ load("//third_party:repo.bzl", "tf_http_archive")
 def repo(name):
     """Imports LLVM."""
     LLVM_COMMIT = "1cb299165c859533e22f2ed05eb2abd5071544df"
-    LLVM_SHA256 = "5a19ab6de4b0089fff456c0bc406b37ba5f95c76026e6bec294ec28dc28e4cb9"
+    LLVM_SHA256 = "10937113be5c7c551cffd7accf426e35b9071cac3251cb2b711076bdda0e98ea"
 
     tf_http_archive(
         name = name,
         sha256 = LLVM_SHA256,
         strip_prefix = "llvm-project-{commit}".format(commit = LLVM_COMMIT),
         urls = [
-            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
-            "https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
+            "https://github.com/llvm/llvm-project/archive/{commit}.zip".format(commit = LLVM_COMMIT),
         ],
         build_file = "//third_party/llvm:llvm.BUILD",
         patch_file = ["//third_party/llvm:macos_build_fix.patch"],

Hi @danielgusland, Clear the cache by calling bazel clean –expunge Command prompt must be Run as Admin for the bazel build of TensorFlow to be successful. Thank you!