google / schedviz

A tool for gathering and visualizing kernel scheduling traces on Linux machines
Apache License 2.0
519 stars 34 forks source link

server wont run because zlib 1.2.11 isn't found #40

Open JonKohler opened 2 years ago

JonKohler commented 2 years ago

Looks like this package was recently-ish updated: https://zlib.net/ and the link being used isn't a perma-link'd on the zlib site

Other projects have addressed it like this: https://github.com/ApolloAuto/apollo/pull/14387 https://github.com/ApolloAuto/apollo/issues/14374

zlib 1.2.12

March 27, 2022

Version 1.2.12 has these key improvements over 1.2.11:

Fix a deflate bug when using the Z_FIXED strategy that can result in out-of-bound accesses.
Fix a deflate bug when the window is full in deflate_stored().
Speed up CRC-32 computations by a factor of 1.5 to 3.
Use the hardware CRC-32 instruction on ARMv8 processors.
Speed up crc32_combine() with powers of x tables.
Add crc32_combine_gen() and crc32_combine_op() for fast combines.

actual output

yarn run v1.22.15
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /home/jkohler/optane/git/schedviz/node_modules/.bin/bazel run server -- -storage_path=/home/jkohler/optane/git/schedviz/traces
INFO: Writing tracer profile to '/home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/command.profile.gz'
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/12a2d801f69ca8fff9128a8044549d7cbac306f1.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Call stack for the definition of repository 'net_zlib' which is a http_archive (rule definition at /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/bazel_tools/tools/build_defs/repo/http.bzl:262:16):
 - /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/io_bazel_rules_go/go/private/repositories.bzl:95:9
 - /home/jkohler/optane/git/schedviz/WORKSPACE:99:1
WARNING: Download from https://zlib.net/zlib-1.2.11.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'net_zlib':
   java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/net_zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found
ERROR: /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/io_bazel_rules_go/go/private/repositories.bzl:91:9: //external:zlib depends on @net_zlib//:zlib in repository @net_zlib which failed to fetch. no such package '@net_zlib//': java.io.IOException: Error downloading [https://zlib.net/zlib-1.2.11.tar.gz] to /home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/net_zlib/zlib-1.2.11.tar.gz: GET returned 404 Not Found
ERROR: Analysis of target '//server:server' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.459s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 2 targets configured)
    Fetching @go_googleapis; Cloning 41d72d444fbe445f4da89e13be02078734fb7875 of https://github.com/googleapis/googleapis
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
JonKohler commented 2 years ago

I was able to work around this by modifying

/home/jkohler/optane/git/.cache/bazel/_bazel_root/839f7ebfb0d1ed872ddd5423553c6d10/external/io_bazel_rules_go/go/private/repositories.bzl.

to look like this in the net_zlib section ... brutal hack but it worked

    if "net_zlib" not in native.existing_rules():
        native.bind(
            name = "zlib",
            actual = "@net_zlib//:zlib",
        )
        http_archive(
            name = "net_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"],
        )