|Anonymous | Login | Signup for a new account||2014-08-30 06:20 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004380||OCaml||OCamlbuild (the tool)||public||2007-09-05 12:02||2012-03-24 15:01|
|Target Version||Fixed in Version||3.12.1+dev|
|Summary||0004380: ocamlbuild should not use tput on windows|
|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.|
|Tags||No tags attached.|
|Attached Files||ocamlbuild-doubleclose.diff [^] (580 bytes) 2008-07-29 04:06 [Show Content]|
|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.|
The ocamlbuild shipped with the 3.10 mingw version indeed tries to use tput under CMD and Cygwin (but not on MSYS):
> set PATH=C:\Program Files\Objective Caml\bin
> ocamlbuild -help
'tput' n'est pas reconnu en tant que commande interne
The version I just compiled from release310 seems to work fine under CMD and Cygwin when using the -help option:
> set PATH=C:\ocamlmgw\bin
> ocamlbuild -help
Usage ocamlbuild [options] <target>
But now if I try, say, "ocamlbuild -clean", it still fails to use tput, and outputs the message:
ocamlbuild: "close_process_in" failed: Bad file descriptor
Hope this helps.
|Up: the issue is still present in OCaml 3.10.2.|
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
Unix.EBADF which is never caught.
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 ?
|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.|
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.
Additionally to the fixed 'close' issue, the 'tput' command
is now called only if 'Sys.os_type' indicates that we are under
Unix (as 'tput' is also missing from a vanilla Cygwin installation).
|2007-09-05 12:02||idadesub||New Issue|
|2007-11-10 14:53||xleroy||Status||new => assigned|
|2007-11-10 14:53||xleroy||Assigned To||=> ertai|
|2007-11-14 20:21||ertai||Note Added: 0004317|
|2007-12-03 16:54||mwipliez||Note Added: 0004379|
|2008-04-11 11:41||mwipliez||Note Added: 0004491|
|2008-05-14 16:58||monate||Note Added: 0004508|
|2008-07-29 04:06||jld||File Added: ocamlbuild-doubleclose.diff|
|2008-07-29 04:07||jld||Note Added: 0004545|
|2008-07-31 09:57||ertai||Note Added: 0004546|
|2010-07-22 11:49||ertai||Assigned To||ertai => xclerc|
|2010-07-22 11:49||ertai||Category||OCaml general => OCamlbuild|
|2010-12-07 15:40||xclerc||Note Added: 0005729|
|2010-12-07 15:40||xclerc||Status||assigned => resolved|
|2010-12-07 15:40||xclerc||Fixed in Version||=> 3.12.1+dev|
|2010-12-07 15:40||xclerc||Resolution||open => fixed|
|2012-02-02 15:17||protz||Category||OCamlbuild => OCamlbuild (the tool)|
|2012-03-24 15:01||xleroy||Status||resolved => closed|
|Copyright © 2000 - 2011 MantisBT Group|