-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
error fetching local_config_cc on version 0.28 on Windows #8943
Comments
@meteorcloudy this looks bad - could you take a look and asses? |
@weggert2 Can you try to run the following command from
If your VC installation is correct, the value of "PATH", "INCLUDE", "LIB", "WINDOWSSDKDIR" environment variables should be set. |
Need more information from user. Probably due to a problem in user's VS installation, so downgrade to P1. |
Apparently it does work with 0.27.2 though... Do you know what have changed? |
Yes, In 0.28.0 we explicitly check if all required environment variables are set by Normally, |
Looks like VS2019 does not set WINDOWSSDKDIR? If that's the case (and it is not an indication of a broken VS2019 installation) I think we should remove the check for WINDOWSSDKDIR and issue a patch release. |
Running the suggested command produces:
The Bazel error remains the same. Here's the full error it prints:
I've got to run to work now, but when I get there I'll see if I can put together a minimal example. |
I think you might be on to something. This is how I've been installing Bazel for my users:
|
@weggert2 Thanks for the information! Do you also have windows sdk installed? And after that, can you retry
|
@dslomov VS 2019 does set So I agree, we should skip the check for |
But I do want to confirm the reason why |
I tried to reproduce issue on a completely clean Windows VM.
It did installed Windows 10 SDK for me. And I'm able to build a cc_binary with Bazel 0.28.1 without doing anything else. @weggert2 Can you check your VS 2019 installation, could it be corrupted for some reason? |
From the Microsoft documentation, the Windows SDK is a required component of the build tools, so it should be installed: https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019 I'm at work now, so I can dig a little deeper. I spun up a fresh VM, fresh bazel 0.28 install using my original build script, and made a trivial hello-world project. It built successfully. Without changing the Bazel configuration, our actual codebase throws the same error as above. I'll spend a few minutes trying to isolate what's making it complain |
@weggert2 Thanks! |
Sorry for the slow reply, I got pulled off to other things. I didn't spend too much time looking, but I didn't manage to find what the difference between our codebase and a trivial "hello world" project that caused the fetch error. For now, I'll downgrade to 0.27.2. Visual Studio has been a bit of a thorn, so I've been hunting for a way to exorcise it from the requirements altogether (I'd also like to enable usage of tools like gdb and valgrind, so we want to get away from the MSVC compiler). For others who come upon this thread, this is undocumented, but you can set up Bazel to work with MinGW only:
Targets can now be built with I tend to recommend that Windows users add the
Hope this helps! |
@weggert2 Be aware, |
I doubt the code base would affect the cc toolchain configuration. Did you check they were running in the same terminal with the same environment variables? |
Thanks for the heads up about the platform selection in the BUILD file, I’ll transition us over to that. I think we cleared up the issue: a combination of enabling developer mode, restarting, and downgrading/re-upgrading Bazel seemed to do it. I’m a little perplexed as to why that worked, the solution and the problem seem unconnected. But in any case, my specific issue is resolved so I’m ok with closing this ticket. |
@weggert2 Sounds good, feel free to reopen this issue if you encounter it again or figure out a repo. Thanks! |
Hi everybody, I also faced this issue on Windows. After 4 days I was finally able to fix it by re-installing all of Microsoft Visual C++. The way I did it is by doing the following:
This should hopefully fix your problem =) |
When upgrading from Version 0.27.2 to 0.28 on Windows, and trying to build a previously-successfully-built C++ project, I get a new error:
Uninstalling 0.28 and re-installing 0.27.2 fixed allowed a successful build so I'm not blocked, but it would be great to have a working build with 0.28
What operating system are you running Bazel on?
Windows
What's the output of
bazel info release
?0.28
Have you found anything relevant by searching the web?
#8781 seemed relevant, but we do not use any external git repos, so it was not the same issue.
The text was updated successfully, but these errors were encountered: