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 should not use tput on windows #4380
Comments
Comment author: ertai That's really strange, because the code tells me that we are already doing that. Our function that runs a command and returns its output can raise the Failure exception that is caught and then the number of columns is defaulted to 80. |
Comment author: mwipliez The ocamlbuild shipped with the 3.10 mingw version indeed tries to use tput under CMD and Cygwin (but not on MSYS):
The version I just compiled from release310 seems to work fine under CMD and Cygwin when using the -help option:
But now if I try, say, "ocamlbuild -clean", it still fails to use tput, and outputs the message: Hope this helps. |
Comment author: mwipliez Up: the issue is still present in OCaml 3.10.2. |
Comment author: monate The problem probably comes from ocamlbuild_unix_plugin.ml inside run_and_open. close is called twice whenever it raises an exception : the second call will raise By the way the command in this function is not wrapped with "bash -c" contrary with the behaviour of sys_command. Is this the expected behaviour ? Cheers |
Comment author: jld I've had to fix the double pclose locally, because NetBSD's tput doesn't seem to support the "cols" attribute; I've attached a diff of my change. |
Comment author: ertai I've applied the given patch to the CVS HEAD. However I've not tested under Cygwin and I would like to know if this fixes the problem. Thanks to idadesub, mwipliez and jld. |
Comment author: @xclerc Additionally to the fixed 'close' issue, the 'tput' command |
git-svn-id: http://caml.inria.fr/svn/ocaml/version/3.12@11238 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Original bug ID: 4380
Reporter: idadesub
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2012-03-24T14:01:42Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.0
Fixed in version: 3.12.1+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: mwipliez monate @db4
Bug description
On windows, if you do not specify "ocamlbuild -classic-display", ocamlbuild will always error out wih a message like "'tput' is not recognized as an internal or external command...". If tput doesn't work, it'd be really nice if ocamlbuild just fell back silently to using -classic-display without requiring that it is specified.
File attachments
The text was updated successfully, but these errors were encountered: