envoyproxy/envoy-openssl

Can't build due to unicode download issue

carmiac opened this issue · 1 comments

The build fails for me early on due to:

WARNING: Download from https://github.com/unicode-org/icu/archive/release-64-2.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was 65271a83fa81783d1272553f4564965ac2e32535a58b0b8141e9f4003afb0e3a but wanted 524960ac99d086cdb6988d2a92fc163436fd3c6ec0a84c475c6382fbf989be05 ERROR: An error occurred during the fetch of repository 'org_unicode_icuuc': java.io.IOException: Error downloading [https://github.com/unicode-org/icu/archive/release-64-2.tar.gz] to /home/carmiac/.cache/bazel/_bazel_carmiac/2f6c9d8c4610bca649831f6411514c8c/external/org_unicode_icuuc/release-64-2.tar.gz: Checksum was 65271a83fa81783d1272553f4564965ac2e32535a58b0b8141e9f4003afb0e3a but wanted 524960ac99d086cdb6988d2a92fc163436fd3c6ec0a84c475c6382fbf989be05 ERROR: /home/carmiac/.cache/bazel/_bazel_carmiac/2f6c9d8c4610bca649831f6411514c8c/external/com_googlesource_googleurl/url/BUILD:6:11: @com_googlesource_googleurl//url:url depends on @org_unicode_icuuc//:common in repository @org_unicode_icuuc which failed to fetch. no such package '@org_unicode_icuuc//': java.io.IOException: Error downloading [https://github.com/unicode-org/icu/archive/release-64-2.tar.gz] to /home/carmiac/.cache/bazel/_bazel_carmiac/2f6c9d8c4610bca649831f6411514c8c/external/org_unicode_icuuc/release-64-2.tar.gz: Checksum was 65271a83fa81783d1272553f4564965ac2e32535a58b0b8141e9f4003afb0e3a but wanted 524960ac99d086cdb6988d2a92fc163436fd3c6ec0a84c475c6382fbf989be05 ERROR: Analysis of target '//:envoy' failed; build aborted: Analysis failed

It's because the checksum is indeed changed, this can be fixed by modify the following file:
envoy/bazel/repository_locations.bzl

original:

    org_unicode_icuuc = dict( 
        strip_prefix = "icu-release-64-2",
        sha256 = "524960ac99d086cdb6988d2a92fc163436fd3c6ec0a84c475c6382fbf989be05",
        urls = ["https://github.com/unicode-org/icu/archive/release-64-2.tar.gz"],
        use_category = ["dataplane"],
        cpe = "cpe:2.3:a:icu-project:international_components_for_unicode",

change to:

    org_unicode_icuuc = dict( 
        strip_prefix = "icu-release-64-2",
        sha256 = "65271a83fa81783d1272553f4564965ac2e32535a58b0b8141e9f4003afb0e3a",
        urls = ["https://github.com/unicode-org/icu/archive/release-64-2.tar.gz"],
        use_category = ["dataplane"],
        cpe = "cpe:2.3:a:icu-project:international_components_for_unicode",