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
ocamlbuild/my_std.ml shouldn't call bash #4981
Comments
Comment author: @xavierleroy As far as I can remember Windows's standard command-line interpreter (cmd.exe) is unusable in ocamlbuild's context (and in many others), because of its incomplete (and undocumented!) quoting behavior: there are plenty of commands that simply cannot be given as argument to "cmd /c" because they cannot be quoted properly. So, that leave little choice but going through a better shell like Cygwin's. Suggestions for alternative approaches most welcome. (Reclassified as "feature wish".) |
Comment author: samin I'm OK with this being reclassified as a feature wish. |
Comment author: ertai I don't rember exactly the examples but try to pass an argument to a command that contains spaces, quotes, slashes, blackslashes and you will quickly found the problem. |
Comment author: Julien Signoles Bashisms are also an issue for BSD-like systems: that is not a Windows-only feature wish. |
Comment author: ertai Bashism is only when you call sh, here we call bash. |
Comment author: @protz Hi, First of all, thanks for reporting. While we believe you're Thanks, jonathan |
Comment author: @ygrek A description of windows quoting rules, including cmd. |
Comment author: @protz The next version of the Windows installer will encourage the user to install Cygwin. A few bugs have been fixed as well, and now ocamlbuild calls bash with what we believe is proper quoting. This should be announced in a few days, once we package the beta release of OCaml 4.00. The official position is now: "if you want to get an ocaml development environment under Windows, just install cygwin". The windows installer will offer you the option of launching cygwin's setup.exe with the right set of packages preselected. But of course we'd be glad to accept a patch that lifts the requirement on bash on Windows. That being said, I don't think anyone here wants to be the person who writes the patch :). Thanks, jonathan |
Comment author: Michael Soegtrop Dear OCaml Team, I want to package a /small/ OCaml with Coq, so that native compute works. It would be nice to have ocamlbuild working as well. I looked into the quoting issue. OCaml's Filename.quote doesn't seem to be appropriate for Windows. The quoting character for Windows is ^ and this character doesn't occur at all in Filename.ml, except as string concat, so this function is for sure wrong. The "documentation" for quoting on Windows I tend to use is: http://ss64.com/nt/syntax-esc.html I would voulunteer to fix this and also to change ocamlbuild to not call bash or unix commands except for "raw shell script actions" (see https://github.com/ocaml/ocamlbuild/blob/13feb3cafc1f4f664aca0a744f2f08e30bffd06a/src/signatures.mli#L190) Would this be appreciated for main stream OCaml, or should I just patch it for Coq? Best regards, Michael |
Original bug ID: 4981
Reporter: samin
Assigned to: @xclerc
Status: resolved (set by @protz on 2012-01-18T10:18:15Z)
Resolution: suspended
Priority: normal
Severity: feature
Version: 3.11.2
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Related to: #5201 #6096 #6107
Monitored by: "Michael Soegtrop" @ygrek thelema Camarade_Tux @jberdine "Julien Signoles" gildor @Chris00 gerd
Bug description
On a vanilla Windows machine, with no cygwin, ocamlbuild falls over.
ocamlbuild calls bash.
But the presence of ocaml Windows distributions implies that I need not have bash on my os.
The text was updated successfully, but these errors were encountered: