New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazel is not working with visual studio 2019 #8589
Comments
Reading closely the log output. |
I found a workaround. here https://github.com/bazelbuild/bazel/blob/master/site/docs/windows.md I had to find this env var in the github, maybe if it is the official solution for this it should be in install-windows troubleshooting of the install-windows page. I still feel there is a bug here. it should at least by default be consistent. And not taking the includes from |
Ok I spoke too fast it doesn't fix the issue all the time. |
the only thing that works is having only 1 folder under the MSVC folder. |
Thanks for reporting. What other versions do you have installed, i.e. what other subdirectories are there under |
I only have one version of community 2019 but it has 2 versions of the compiler. 14.61 and 14.21. The issue is that the include path is not consistent with the compiler. This include path was set |
Thanks. I couldn't repro this bug yet, but let's assume it's a Bazel bug until proven otherwise. |
Hi @monamimani , I fixed exactly this issue at e5b7bd6, And with 0.27.0, the include directories should be consistent with the compiler even if you don't specify |
Thanks it is fixed |
I'm on Bazel 2.0 and it still couldn't pick the right MSVC version. I had both 2017 and 2019 installed. And even removing the older one didn't help. Even after a full reboot it tried to use the deleted version. In my case specifying the exact directory helped |
@roman-kruglov Is there any stale directories from the deleted version? That could confuse Bazel's MSVC auto configure. |
Yep, there was a leftover directory, something like |
Description of the problem / feature request:
I want to compile a simple helloworld project but Bazel fails early he seems to be confused about where to find what he need.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
execute this commands in powershell
bazel build Project1/HelloWorld --compilation_mode=dbg --verbose_failures -s
What operating system are you running Bazel on?
windows
What's the output of
bazel info release
?release 0.26.1
Have you found anything relevant by searching the web?
no, it seems it should work
Any other information, logs, or outputs that you want to share?
here is the console output
BAZEL_VC = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC
BAZEL_VS = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
The text was updated successfully, but these errors were encountered: