Skip to content

Bazel build error “Invalid or incomplete multibyte or wide character” #16065

@QIvan

Description

@QIvan

Title: Bazel build error “Invalid or incomplete multibyte or wide character”

Description:
I followed your instruction to set up my build environment. I use Linux Ubuntu 20.04

I installed Bazelisk as bazel and downloaded clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-16.04 as required. But at the build step I got an exception:

bazel build --config=libc++ //source/exe:envoy-static

the output is

...   
ERROR: An error occurred during the fetch of repository 'go_sdk':
   Traceback (most recent call last):
    File "/home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/io_bazel_rules_go/go/private/sdk.bzl", line 100, column 16, in _go_download_sdk_impl
        _remote_sdk(ctx, [url.format(filename) for url in ctx.attr.urls], ctx.attr.strip_prefix, sha256)
    File "/home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/io_bazel_rules_go/go/private/sdk.bzl", line 180, column 29, in _remote_sdk
        ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error extracting /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/temp12776099964645160554/go1.15.5.linux-amd64.tar.gz to /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/temp12776099964645160554: /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/test/fixedbugs/issue27836.dir/Äfoo.go (Invalid or incomplete multibyte or wide character)
ERROR: Analysis of target '//source/exe:envoy-static' failed; build aborted: java.io.IOException: Error extracting /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/temp12776099964645160554/go1.15.5.linux-amd64.tar.gz to /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/temp12776099964645160554: /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/test/fixedbugs/issue27836.dir/Äfoo.go (Invalid or incomplete multibyte or wide character)
INFO: Elapsed time: 9.751s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (18 packages loaded, 6 targets configured)
    Fetching ...b20/external/go_sdk; Extracting /home/ivan/.cache/bazel/_bazel_ivan/bc15f3e663f55c36b0229b6c70ea3b20/external/go_sdk/temp12776099964645160554/go1.15.5.linux-amd64.tar.gz 6s

I understand it's somehow related to encodings but I'm out of options what can I do here.

[optional Relevant Links:]
I've found a similar problem
https://www.gitmemory.com/issue/bazelbuild/rules_go/2771/755621824

I also made a question on stackoverflow https://stackoverflow.com/questions/67165482/bazel-error-during-envoyproxy-envoy-build-invalid-or-incomplete-multibyte-or-wi

thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildquestionQuestions that are neither investigations, bugs, nor enhancements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions