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

zlib-1.2.11.tar.gz: GET returned 404 Not Found #16192

Closed
aaliwei91 opened this issue Aug 30, 2022 · 1 comment
Closed

zlib-1.2.11.tar.gz: GET returned 404 Not Found #16192

aaliwei91 opened this issue Aug 30, 2022 · 1 comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug untriaged

Comments

@aaliwei91
Copy link

Description of the bug:

ubuntu@DESKTOP-8EFQK2H:~/martin_test/arbor/experimental$ bazel build continuousData --define os=ubuntu
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "09745575a923640154bcf307fba8aedff47f240a", shallow_since = "1558721209 -0700" and dropping ["tag"]
DEBUG: Rule 'bazel_skylib' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "6741f733227dc68137512161a5ce6fcf283e3f58", shallow_since = "1549647446 +0100" and dropping ["tag"]
ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/eb9b4f3f004e28679b89a6c1867684e9/external/com_google_protobuf/BUILD:148:1: no such package '@zlib//': java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /home/ubuntu/.cache/bazel/_bazel_ubuntu/eb9b4f3f004e28679b89a6c1867684e9/external/zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found and referenced by '@com_google_protobuf//:protobuf'
ERROR: Analysis of target '//arbor/experimental:continuousData' failed; build aborted: no such package '@zlib//': java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /home/ubuntu/.cache/bazel/_bazel_ubuntu/eb9b4f3f004e28679b89a6c1867684e9/external/zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found
INFO: Elapsed time: 1.593s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

ubuntu 18.04 lts

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

bazel 0.24.1

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

#15386
https://onlyabug.com/issue/zlib-1211targz-is-not-found-on-official-14374

Any other information, logs, or outputs that you want to share?

I use WSL, and reinstall the system today.

Just before I reinstall the system, it worked for me for many years.

Then, just after I reinstall the system today, it didn't work for me.

I think maybe perviously, when I compiled the program with bazel, it had zlib-1.2.11 on the website, so it could compile it without any problem. The latest time may be March 2022. Even after they deleted zlib-1.2.11, since I have already compiled it on my system, it would not generate a problem.

Then today I reinstalll the system, and it has no zlib in it, then it generates such problem.

Even I download zlib-1.2.12 manually and installed it by myself, the bazel still generates an error.

So I think possible solutions are:

1.update zlib-1.2.11 to zlib-1.2.12 in all the bazel related stuff
2.provide a method for us to specify bazel to download zlib-1.2.12 directly;
3.If we download zlib-1.2.12 and install it, bazel can detect it and would not download it again.

Thank you very much.

@ShreeM01 ShreeM01 added type: bug team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. untriaged labels Aug 30, 2022
@aaliwei91
Copy link
Author

After a few hours, now I have solved it.

in ~/.cache/bazel/_bazel_ubuntu/eb9xxxxxxxxxxxxxx/external/com_google_protobuf/

there is a file protobuf_deps.bzl, and I can change the 1.2.11 to 1.2.12, as well as the sha256 field.
def protobuf_deps():
"""Loads common dependencies needed to compile the protobuf library."""

if "zlib" not in native.existing_rules():
    http_archive(
        name = "zlib",
        build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
        sha256 = "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9",
        strip_prefix = "zlib-1.2.12",
        urls = ["https://zlib.net/zlib-1.2.12.tar.gz"],
    )

actually, at first I don't know the sha256 field. but after using bazel build again, it generates an error of wrong checksum, so I copied the checksum value to sha256 fileld and it worked finally.

BenHenning added a commit to oppia/oppia-android that referenced this issue May 27, 2024
This ensures the fixes explained in
bazelbuild/rules_proto#117 and
bazelbuild/bazel#16192 are included to fix CI
breakages on this branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug untriaged
Projects
None yet
Development

No branches or pull requests

2 participants