rules_kotlin icon indicating copy to clipboard operation
rules_kotlin copied to clipboard

failed to build when --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 is passed

Open mgenov opened this issue 4 years ago • 0 comments

Bazel throws the following error when platforms option is specified:

INFO: Build option --toolchain_resolution_debug has changed, discarding analysis cache.
ERROR: While resolving toolchains for target //kotlin/libs:gson_lib_deps: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
ERROR: Analysis of target '//services/infra/configuration/java/server:push' failed; build aborted: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
INFO: Elapsed time: 0.576s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 415 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 415 targets configured)

The problem arises with kotlin build when --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 is passed.

On my side it works properly with go_image and container_push but when used with kt_jvm_image and container_push I'm getting the following message:

e.g it looks like an issue with tool-chain resolution

mgenov avatar Jan 21 '21 19:01 mgenov