bazel: Unable to build x86 based unit tests with bazel 6.0.0rc4 because there is no x86 based remote java toolchain

Description of the bug:

We have a C++ toolchain with both intel x64 and x86 definitions. When we build with x64 the tests work fine, when we build with x86 you can see the toolchain resolution doesn’t find any remote_jdk_11 with the which matches the CPU.

ERROR: C:/dev/_bazel/jarbmqax/external/remote_coverage_tools/BUILD:10:12: While resolving toolchains for target @remote_coverage_tools//:Main: No matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type.                                                                                                                                                                                                     
To debug, rerun with --toolchain_resolution_debug='@bazel_tools//tools/jdk:runtime_toolchain_type'                                                                                                                   
If platforms or toolchains are a new concept for you, we'd encourage reading https://bazel.build/concepts/platforms-intro.                                                                                     

What’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Unfortunately: You need a C++ toolchain with x64 and x86 support, we are using platforms.

When but just running bazel build with the x64 platform will work, as soon as we switch the to building with an x86 platform we get the toolchain resolution error.

We had to specify build --java_runtime_version=remotejdk_11 to get the build to work.

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

release 6.0.0rc4

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What’s the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

bazel version 
`Bazelisk version: v1.15.0
Build label: 6.0.0rc4
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Dec 2 13:47:04 2022 (1669988824)
Build timestamp: 1669988824
Build timestamp as int: 1669988824
`



INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_jdk//:jdk; mismatching config settings: localjdk_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux//:jdk; mismatching values: linux
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux_aarch64//:jdk; mismatching values: linux, arm64
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux_ppc64le//:jdk; mismatching values: linux, ppc
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux_s390x//:jdk; mismatching values: linux, s390x
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_macos//:jdk; mismatching values: osx              
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_macos_aarch64//:jdk; mismatching values: osx, arm64
INFO: ToolchainResolution:   Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: execution @local_config_platform//:host: Selected toolchain @remotejdk11_win//:jdk  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_win_arm64//:jdk; mismatching values: arm64        
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_linux//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_linux_aarch64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_macos//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_macos_aarch64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_win//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_win_arm64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_linux//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_linux_aarch64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_macos//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_macos_aarch64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_win//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_win_arm64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, type @bazel_tools//tools/cpp:toolchain_type -> toolchain //tools/config:sophos_win_x64_toolchain, type @bazel_tools//tools/jdk:toolchain_type -> toolchain @bazel_tools//tools/jdk:toolchain_java11, type @bazel_tools//tools/jdk:runtime_toolchain_type -> toolchain @remotejdk11_win//:jdk
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_jdk//:jdk; mismatching config settings: localjdk_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux//:jdk; mismatching values: linux            
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux_aarch64//:jdk; mismatching values: linux, arm64                                                                                                                                                                                                                  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux_ppc64le//:jdk; mismatching values: linux, ppc
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_linux_s390x//:jdk; mismatching values: linux, s390x                                                                                                                                                                                                                    
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_macos//:jdk; mismatching values: osx              
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_macos_aarch64//:jdk; mismatching values: osx, arm64                                                                                                                                                                                                                    
INFO: ToolchainResolution:   Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: execution @local_config_platform//:host: Selected toolchain @remotejdk11_win//:jdk  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk11_win_arm64//:jdk; mismatching values: arm64        
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_linux//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                       
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_linux_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                               
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_macos//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                       
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_macos_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                               
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_win//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                         
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk17_win_arm64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                   
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_linux//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                       
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_linux_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                               
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_macos//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                       
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_macos_aarch64//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_win//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                         
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @remotejdk18_win_arm64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                   
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, type @bazel_tools//tools/cpp:toolchain_type -> toolchain //tools/config:sophos_win_x64_toolchain, type @bazel_tools//tools/jdk:toolchain_type -> toolchain @bazel_tools//tools/jdk:toolchain_java8, type @bazel_tools//tools/jdk:runtime_toolchain_type -> toolchain @remotejdk11_win//:jdk          
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @local_jdk//:jdk; mismatching config settings: localjdk_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_linux//:jdk; mismatching values: linux, x86_64  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_linux_aarch64//:jdk; mismatching values: linux, arm64                                                                                                                                                                                                                
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_linux_ppc64le//:jdk; mismatching values: linux, ppc                                                                                                                                                                                                                  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_linux_s390x//:jdk; mismatching values: linux, s390x                                                                                                                                                                                                                  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_macos//:jdk; mismatching values: osx, x86_64    
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_macos_aarch64//:jdk; mismatching values: osx, arm64                                                                                                                                                                                                                  
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_win//:jdk; mismatching values: x86_64           
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk11_win_arm64//:jdk; mismatching values: arm64      
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk17_linux//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                     
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk17_linux_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                             
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk17_macos//:jdk; mismatching config settings: prefix_version_setting
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk17_macos_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                             
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk17_win//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                       
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk17_win_arm64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                 
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk18_linux//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                     
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk18_linux_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                             
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk18_macos//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                     
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk18_macos_aarch64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                             
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk18_win//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                       
INFO: ToolchainResolution:     Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: Rejected toolchain @remotejdk18_win_arm64//:jdk; mismatching config settings: prefix_version_setting                                                                                                                                                                                                 
INFO: ToolchainResolution:   Type @bazel_tools//tools/jdk:runtime_toolchain_type: target platform //tools/config:win_x86_platform: No toolchains found.   

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@comius I submitted a fix for the 6.0.0 regression (https://github.com/bazelbuild/bazel/pull/16994). While I am at it, I will create a follow-up PR to fix https://github.com/bazelbuild/bazel/issues/15088, but that is of course not a regression and the fix should not go into 6.0.0.

@bazel-io fork 6.0.0