-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Windows issue: missing $GOPATH when pure="on" is set #1987
Comments
By disabling
|
Are you using Gazelle (in WORKSPACE)? If so, what version? Older versions of Gazelle don't support Go 1.12 and error out with a message like this. For the second series of errors, MSVC is not compatible with Go. There are some draft setup instructions for msys and mingw in windows.rst if that's useful. |
We are currently using the latest version (0.17.0) but we tried with the previous version as well (0.16.0) the output is the same.
This is the first installation attempt on a Windows machine, I definitely missed this information during the installation of Bazel. Thank you for the link. I am pretty sure that the first issue is also related to MSVC, therefore I will close this issue. |
To clarify about MSVC: Bazel is compatible with MSVC (and will use it by default for This is due to how cgo works. |
I am reopening this issue because after a successful configuration of GCC it is now correctly compiling without the The output error is the same as before:
|
This doesn't appear to be purely a Windows issue; I'm getting a similar error on a linux host:
Switching to an earlier go sdk with go_register_toolchains(go_version="1.10.8") allows building. It appears that the |
@GauntletWizard I can't reproduce this in any configuration. Could you give me more information? Ideally fill out the issue template. It looks like you're running inside a Docker container, but I have no idea what's in your environment or what version you're using. If you could give me enough info to reproduce this on a "hello world" binary in a clean workspace, that would be very helpful. Could you try rules_go at master and see if the issue has been fixed already? Could you try setting |
I've isolated my issue down to I'm uncertain why 1.10 worked in this setup. After a successful build with sandboxed strategy, I no longer have the error, so it's not affecting the build targets themselves. |
@GauntletWizard Sorry, I can't reproduce this and can't make progress without more information. I'm going to close this, but feel free to reopen with a complete, minimal set of files and list of commands to run. I tried running the ubuntu:16.04 docker image on macOS. I installed, Bazel, git, unzip, build-essential, and I built a "hello world" binary with |
Hi @jayconrod See instructions to reproduce here: https://github.com/gorilych/rules-go-issue-1987/blob/master/README.txt |
@gorilych Thanks for putting together that example. That was very helpful. It looks like this was fixed by part of #2079. We need to explicitly set This seems to be a very narrow issue. It should not come up when using sandboxing or remote execution. I'm not sure how this image is constructed, but it doesn't look like Bazel is using sandboxing for this action. In any case, the fix for this will be cherry-picked into the next release, which should be in a couple weeks. |
This error pops up whenever we try to build a Golang application on Windows with
rules_go 0.18.0
andrules_go 0.17.1
.Git installation path:
C:\Users\Bazeluser\AppData\Local\Programs\Git\bin
MSYS installation path:
C:\msys64
Visual Studio:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
The application is being built with
pure = "on"
on aWindows 10
machine.The error being shown from the logs is
missing $GOPATH
.The text was updated successfully, but these errors were encountered: