-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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, msys-less: support other shells (cygwin, powershell) #2725
Comments
Came up while working on #2725 -- Change-Id: I923690642d0fc93dcdb5050837b5ddaaa2a1d494 Reviewed-on: https://cr.bazel.build/9469 PiperOrigin-RevId: 150880961 MOS_MIGRATED_REVID=150880961
See #2725 Related to #2447 -- Change-Id: I5cc7fba43ae46bc9ef47bcaf9efaf2a0b9911bc4 Reviewed-on: https://cr.bazel.build/9468 PiperOrigin-RevId: 150881196 MOS_MIGRATED_REVID=150881196
See #2725 Related to #2447 -- Change-Id: I723764ee1b41caf62a7d71abcdcdfb704521f206 Reviewed-on: https://cr.bazel.build/9511 PiperOrigin-RevId: 150882100 MOS_MIGRATED_REVID=150882100
Make it more robust: it now works with Cygwin too, e.g. BAZEL_SH=c:/cygwin64/bin/bash.exe See #2725 Related to #2447 -- Change-Id: I911f09acd3e39c7cd0fe0750774fa0a900ffd844 Reviewed-on: https://cr.bazel.build/9510 PiperOrigin-RevId: 150885982 MOS_MIGRATED_REVID=150885982
Update: cygwin doesn't have |
...or better yet, have a hermetic zip utility in |
Just define
|
Neat! Thanks for the tip. I didn't find zip/unzip in the installer's package selector's search bar before, but the |
Thanks again @davido , now it works like a charm -- I can now build the previously failing genrule. We still cannot build
|
@laszlocsomor Thank you for all your hard work to support Windows platform! |
Cool, it all works now. Turns out I made PATH too bare. From cygwin:
From cmd.exe:
|
To be fair this bug isn't yet closed as I haven't tested with Windows bash (my work machine doesn't have it). @davido Do you have Windows bash installed and would you be interested in trying it? |
@laszlocsomor What exactly do you mean by "Windows bash"? Windows Subsystem for Linux feature? I thought this is tracked in different issue: #1608. Yes, i can reproduce it, see my last comment there. Yes, i have that installed, but I'm not sure, how could I try bazel from master, if bazel cannot be run there? Right now I installed Bazel released version from Ubuntu Bazel repository (0.4.5). |
@davido : Yes, that's what I meant, and thanks for referencing the bug, I wasn't aware of it. |
@laszlocsomor There are two tiny steps more. You enable developer feature on your machine and select "Windows Subsystem for Linux feature " from the Settings GUI (that I wasn't able to find ;-), so I was able to enable this feature in alternative way, per power shell command. Then you reboot, and voilà, you run See the step by step installation guide provided here. Then I added Java8 PPA and installed Java8, both JDK and JRE, and added Bazel repository and installed bazel 0.4.5 and was able to run |
Cool, thanks! microsoft/WSL#620 (comment) goes further in suspecting Java as the culprit, but then in microsoft/WSL#620 (comment) someone shows a completed |
@laszlocsomor Thanks! As I said in another issue, making Bazel work on "Windows bash" would be a huge step forward to support Windows platform for all bazel driven projects. And that would definitely help Gerrit community with Gerrit Code Review, JGit, Gitiles, Prolog-Caffee, 100+ plugins: all those projects are pure Java/JavaScript projects and don't have any native code (so that MSVC is definitely unrelated). I would be also able to help with investigation, but unfortunately I'm stuck and don't know how to proceed any further. Do you have any hints for me? |
Thanks, your help would be greatly appreciated!
|
I don't think any MSVC related questions make any sense on "Windows Bash". That's Linux Ubuntu Trusty, that is ran without virtual machine. The whole MSVC topic is entirely unrelated. In fact, you can't run any Windows binary on "Windows Bash". At least that's how I understand it. |
I see, thanks. So if anything we could only run the Linux version of bazel, right? |
Yes, that's correct.
Yes, it works.
Yes, I was able to install pre-built version 0.4.5 Bazel and run
I haven't tried that yet. |
And that's what hung for "bazel build foo", correct? I think I caught up to you now :) |
Yeah, exactly! ;-) |
In light of the latest comments here I'm closing this bug. Let's continue on #1608. |
Description of the problem / feature request / question:
The MSYS-less version should, by definition, work under other shells.
At c34320d it works under cmd.exe, Powershell 5.0.10586.672, MSYS2 20161025, and potentially other versions of these too, but these are the ones I tried.
It however doesn't work under Cygwin, especially if I do:
Since the MSYS-less version should only require a valid BAZEL_SH for now (complete independence from MSYS is a bit further away), these scenarios should work.
The text was updated successfully, but these errors were encountered: