tools_jvm_autodeps icon indicating copy to clipboard operation
tools_jvm_autodeps copied to clipboard

Failed Building with Bazel 0.21

Open guw opened this issue 6 years ago • 0 comments

Following the steps in the README and running into issues building:

$ bazel build -c opt //cmd/jadep
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 18a59634-6aa0-46bb-ab19-6a2bf04279d7
ERROR: error loading package '': Encountered error while reading extension file 'go/def.bzl': no such package '@io_bazel_rules_go//go': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
ERROR: error loading package '': Encountered error while reading extension file 'go/def.bzl': no such package '@io_bazel_rules_go//go': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
INFO: Elapsed time: 1.783s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
    Fetching @io_bazel_rules_go; fetching

I tried the suggestion but the build then fails with a different error:

$ bazel build -c opt //cmd/jadep --incompatible_remove_native_http_archive=false
INFO: Invocation ID: db409e9e-3580-4c14-8730-7a954bb6dab6
ERROR: /private/var/tmp/_bazel_.../external/io_bazel_rules_go/go/toolchain/BUILD.bazel:9:1: no such target '@io_bazel_rules_go//go:toolchain': target 'toolchain' not declared in package 'go'; however, a source directory of this name exists.  (Perhaps add 'exports_files(["toolchain"])' to go/BUILD, or define a filegroup?) defined by /private/var/tmp/_bazel_.../external/io_bazel_rules_go/go/BUILD.bazel and referenced by '@io_bazel_rules_go//go/toolchain:go_linux_arm64_cross_linux_mips'
ERROR: While resolving toolchains for target //cmd/jadep:jadep: invalid registered toolchain '@io_bazel_rules_go//go/toolchain:go_linux_arm64_cross_linux_mips': Analysis failed
ERROR: Analysis of target '//cmd/jadep:jadep' failed; build aborted: Analysis failed
INFO: Elapsed time: 7.154s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (8 packages loaded, 37 targets configured)

guw avatar Jan 07 '19 15:01 guw