question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛 Bug]: bazel build failing on Windows

See original GitHub issue

What happened?

Hi, I’m trying to set up my local ENV after cloning the Selenium repo. While running the following command: bazel build //dotnet/test/common:chrome it fails with the relevant log output below .

How can we reproduce the issue?

I've followed the following guide: http://jimevansmusic.blogspot.com/2020/04/setting-up-windows-development.html
and run this command: 'bazel build //dotnet/test/common:chrome`

Relevant log output

ERROR: C:/users/dor-b/_bazel_dor-b/xrjmyool/external/netcore-sdk-windows/BUILD.bazel:22:10: Compiling external/netcore-sdk-windows/main-cc.main.cc [for host] failed: (Exit -1): cl.exe failed: error executing command
  cd /d C:/users/dor-b/_bazel_dor-b/xrjmyool/execroot/selenium
  SET INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
    SET PATH=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;;C:\WINDOWS\system32;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
    SET PWD=/proc/self/cwd
    SET TEMP=C:\Users\Dor-B\AppData\Local\Temp
    SET TMP=C:\Users\Dor-B\AppData\Local\Temp
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250 /wd4996 /Iexternal/netcore-sdk-windows /Ibazel-out/host/bin/external/netcore-sdk-windows /Iexternal/bazel_tools /Ibazel-out/host/bin/external/bazel_tools /showIncludes /MD /O2 /Oy- /DNDEBUG /wd4117 -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" /Gy /Gw /Fobazel-out/host/bin/external/netcore-sdk-windows/_objs/dotnetw/main-cc.main.obj /c bazel-out/host/bin/external/netcore-sdk-windows/main-cc.main.cc
# Configuration: 2374fec5ef31ff2407690734dae8ccf7ab4a614d38e9b25881e2c19130a3aab3
# Execution platform: @local_config_platform//:host
Action failed to execute: java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.exe" /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250 /wd4996 /Iexternal/netcore-sdk-windows /Ibazel-out/host/bin/external/netcore-sdk-windows /Iexternal/bazel_tools /Ibazel-out/host/bin/external/bazel_tools /showIncludes /MD /O2 /Oy- /DNDEBUG /wd4117 "-D__DATE__=\"redacted\"" "-D__TIME(...)): The system cannot find the file specified.
 (error: 2)

Operating System

Microsoft Windows 10 Pro 10.0.19045 Build 19045

Selenium version

dotnet 4.6.0

What are the browser(s) and version(s) where you see this issue?

not relevant

What are the browser driver(s) and version(s) where you see this issue?

not relevant

Are you using Selenium Grid?

nope

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
titusfortnercommented, Nov 22, 2022

Thanks. This issue prompted me to try building a Selenium dev environment in Windows from scratch. Hope to have an updated process soon.

1reaction
Dor-blcommented, Nov 22, 2022

With the help of @jimevans, I was able to have a successful build after I added msys64\usr\bin to the system Path variable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] bazel build failed in Windows · Issue #20672 - GitHub
This is my PR #19511. I add some runtime env protobuf and then common_proto depends on runtime_env_common_proto . This change leaded to a...
Read more >
Obscure build failure on Windows after Bazel commit ...
Here the problem appears to be that Bazel tries to build intermediary DLLs, which doesn't work well on Windows because DLLs don't export...
Read more >
Error building TensorFlow 2.8 in Windows 10
Hello, I am getting warnings and errors when trying to build TensorFlow 2.8 for CPU and CUDA. Please direct me to the solution....
Read more >
Bazel Android Hello World Tutorial: Error Building
I have Android API 33 downloaded through Android studio, machine running Windows 11. Any suggestions on how to address this? I'm new to...
Read more >
Installing Bazel on Windows
Bazel shows an error if a build target needs Bash but Bazel could not locate it. Common MSYS2 packages. You will likely need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found