envoy: Can't generate compilation DB on M1 Mac
Description:
/tools/vscode/refresh_compdb.sh
doesn’t succeed on an M1 MBP due to toolchain selection failure. This happens if I run the script directly on the host and inside the devcontainer, although for different reasons. Unfortunately I don’t have an Intel Mac to attempt a repro on.
Toolchain debug output on the devcontainer:
[output truncated for brevity]
INFO: ToolchainResolution: Target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Selected execution platform @envoy_build_tools//toolchains:rbe_linux_clang_platform, type @bazel_tools//tools/cpp:toolchain_type -> toolchain @envoy_build_tools//toolchains/configs/linux/clang/cc:cc-compiler-k8
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_freebsd_386-impl; mismatching values: freebsd, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_freebsd_amd64-impl; mismatching values: freebsd
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_freebsd_arm-impl; mismatching values: freebsd, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_freebsd_arm64-impl; mismatching values: freebsd, arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_illumos_amd64-impl; mismatching values: illumos
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_ios_amd64-impl; mismatching values: ios
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_ios_arm64-impl; mismatching values: ios, arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_js_wasm-impl; mismatching values: js, wasm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_386-impl; mismatching values: x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: execution platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_amd64-impl; mismatching values: arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_arm-impl; mismatching values: arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_arm64-impl; mismatching values: arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_mips-impl; mismatching values: mips
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_mips64-impl; mismatching values: mips64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_mips64le-impl; mismatching values: mips64le
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_mipsle-impl; mismatching values: mipsle
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_ppc64-impl; mismatching values: ppc64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_ppc64le-impl; mismatching values: ppc
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_riscv64-impl; mismatching values: riscv64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_linux_s390x-impl; mismatching values: s390x
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_nacl_386-impl; mismatching values: nacl, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_nacl_amd64p32-impl; mismatching values: nacl, amd64p32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_nacl_arm-impl; mismatching values: nacl, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_netbsd_386-impl; mismatching values: netbsd, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_netbsd_amd64-impl; mismatching values: netbsd
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_netbsd_arm-impl; mismatching values: netbsd, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_netbsd_arm64-impl; mismatching values: netbsd, arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_openbsd_386-impl; mismatching values: openbsd, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_openbsd_amd64-impl; mismatching values: openbsd
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_openbsd_arm-impl; mismatching values: openbsd, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_openbsd_arm64-impl; mismatching values: openbsd, arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_plan9_386-impl; mismatching values: plan9, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_plan9_amd64-impl; mismatching values: plan9
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_plan9_arm-impl; mismatching values: plan9, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_solaris_amd64-impl; mismatching values: solaris
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_windows_386-impl; mismatching values: windows, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_windows_amd64-impl; mismatching values: windows
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_windows_arm-impl; mismatching values: windows, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: Rejected toolchain @go_sdk//:go_windows_arm64-impl; mismatching values: windows, arm64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @envoy_build_tools//toolchains:rbe_linux_clang_platform: No toolchains found.
INFO: Repository jq_linux_amd64 instantiated at:
/workspaces/envoy/WORKSPACE:25:25: in <toplevel>
/workspaces/envoy/bazel/dependency_imports.bzl:54:27: in envoy_dependency_imports
/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/external/aspect_bazel_lib/lib/repositories.bzl:37:25: in register_jq_toolchains
Repository rule jq_platform_repo defined at:
/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/external/aspect_bazel_lib/lib/private/jq_toolchain.bzl:183:35: in <toplevel>
ERROR: /build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/external/com_envoyproxy_protoc_gen_validate/BUILD:11:10: While resolving toolchains for target @com_envoyproxy_protoc_gen_validate//:protoc-gen-validate: no matching toolchains found for types @io_bazel_rules_go//go:toolchain
ERROR: Analysis of target '//tools/type_whisperer:types_cc_proto_validate' failed; build aborted:
Toolchain debug output on the local host:
[output truncated for brevity]
INFO: ToolchainResolution: Type @aspect_bazel_lib//lib:jq_toolchain_type: target platform @local_config_platform//:host: No toolchains found.
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_linux_s390x-impl; mismatching values: linux, s390x
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_nacl_386-impl; mismatching values: nacl, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_nacl_amd64p32-impl; mismatching values: nacl, amd64p32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_nacl_arm-impl; mismatching values: nacl, arm
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_netbsd_386-impl; mismatching values: netbsd, x86_32
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_netbsd_amd64-impl; mismatching values: netbsd, x86_64
INFO: ToolchainResolution: Type @io_bazel_rules_go//go:toolchain: target platform @local_config_platform//:host: Rejected toolchain @go_sdk//:go_netbsd_arm-impl; mismatching values: netbsd, arm
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32; mismatching values: wasm32
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32; mismatching values: wasm32
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32; mismatching values: wasm32
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @rules_rust//rust/private/dummy_cc_toolchain:dummy_cc_wasm32; mismatching values: wasm32
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm
[...]
ERROR: /Users/jtian/src/envoy/tools/code/BUILD:10:3: While resolving toolchains for target //tools/code:extensions_build_config: no matching toolchains found for types @aspect_bazel_lib//lib:jq_toolchain_type
ERROR: Analysis of target '//tools/code:extensions_build_config' failed; build aborted:
Repro steps:
- Open the project in VSCode with the Remote-Container extension activated, and run the “Refresh Compilation Database” task.
- Or, set up the local dev env on an m1 Mac and run
./tools/vscode/refresh_compdb.sh
- I’m running this on an M1 Max MBP, MacOS 12.4
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22 (22 by maintainers)
Commits related to this issue
- bazel: update bazel-lib Fixes https://github.com/envoyproxy/envoy/issues/22217 Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> — committed to keith/envoy by keith 2 years ago
- bazel: update bazel-lib Fixes https://github.com/envoyproxy/envoy/issues/22217 Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> — committed to envoyproxy/envoy by keith 2 years ago
- bazel: update rules_python This pulls in this commit https://github.com/bazelbuild/rules_python/pull/697 which fixes another issue with https://github.com/envoyproxy/envoy/issues/22217 (although not ... — committed to keith/envoy by keith 2 years ago
- bazel: update rules_python This pulls in this commit https://github.com/bazelbuild/rules_python/pull/697 which fixes another issue with https://github.com/envoyproxy/envoy/issues/22217 (although not ... — committed to envoyproxy/envoy by keith 2 years ago
- bazel: disable uring with compilation database This is a workaround for https://github.com/envoyproxy/envoy/issues/22217 with the downside that it disables it for all platforms. Signed-off-by: Keith... — committed to keith/envoy by keith 2 years ago
- bazel: disable uring with compilation database This is a workaround for https://github.com/envoyproxy/envoy/issues/22217 with the downside that it disables it for all platforms. Signed-off-by: Keith... — committed to envoyproxy/envoy by keith 2 years ago
- bazel: update bazel-lib Fixes https://github.com/envoyproxy/envoy/issues/22217 Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> — committed to maistra/envoy by keith 2 years ago
- bazel: update rules_python This pulls in this commit https://github.com/bazelbuild/rules_python/pull/697 which fixes another issue with https://github.com/envoyproxy/envoy/issues/22217 (although not ... — committed to maistra/envoy by keith 2 years ago
- bazel: disable uring with compilation database This is a workaround for https://github.com/envoyproxy/envoy/issues/22217 with the downside that it disables it for all platforms. Signed-off-by: Keith... — committed to maistra/envoy by keith 2 years ago
cool - re backporting - im thinking lets skip it for now and if anyone complains we can backport it