-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Description
We use msvc-dev-cmd to setup the MSVC build environment before running Bazel builds, and this has worked well on windows-2019 and windows-2022 runners for months. Since the 20230517.1 update, we've been seeing the following error from our windows-22 jobs:
The target you are compiling requires Visual C++ build tools.
Bazel couldn't find a valid Visual C++ build tools installation on your machine.
Visual C++ build tools seems to be installed at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC
But Bazel can't find the following tools:
VCVARSALL.BAT, cl.exe, link.exe, lib.exe, ml64.exe
for x64 target architecture
Please check your installation following https://docs.bazel.build/versions/main/windows.html#using
Platforms affected
- Azure DevOps
- GitHub Actions - Standard Runners
- GitHub Actions - Larger Runners
Runner images affected
- Ubuntu 20.04
- Ubuntu 22.04
- macOS 11
- macOS 12
- macOS 13
- Windows Server 2019
- Windows Server 2022
Image version and build link
Image: windows-2022
Version: 20230517.1
Included Software: https://github.com/actions/runner-images/blob/win22/20230517.1/images/win/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20230517.1
Is it regression?
yes, this was working on 20230508.3 (https://github.com/protocolbuffers/protobuf/actions/runs/5148680966/jobs/9270810559)
Expected behavior
Bazel should be able to find the MS build tools
Actual behavior
Bazel is failing to find build tools and can't compile C++ code
Repro steps
Run a bazel build over C++ code in windows-2022