-
Notifications
You must be signed in to change notification settings - Fork 397
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
Error "The command line is too long" for very short command line (<250 characters) on Cygwin/Windows #2991
Comments
Commands which are invoked via A workaround for compiler invocations is to use |
Well but the command has less than 250 characters. It is shown in the error message. Btw.: why are you using CMD in dune? In case you are using it for redirection and quoting, I might have a superior alternative for Windows (a posix compliant shell interpreter written in C but it only supports what one typically puts into system commands, that is IO redirection, quoting and env assignments, but in this it should not be distingusishable from a proper posix shell, except for the 32K limit you mentioned). |
Oops, somehow reading it on my phone I missed that the full command was in that readout! Are you able to run that command manually (and see the error) and, if so, is the log clearer if you add |
Indeed the error seems to come from ocamlopt when it calls the linker. If I run from cygwin (the OCaml tools in my setup are MinGW):
So I would say this is not a dune but an OCaml issue. I try to find out what the command line is. |
If you add |
What really goes wild is the call to gcc by ocamlopt via flexlink. It has 8193 charaters (beyond the CMD limit) and the cygwin path appears 131 times in it, so each character in the path adds 131 characters to the command line. Do you know whom I could contact in the OCaml world to discuss a possible replacement of CMD in OCaml tools on Windows? Wasn't it discussed once that the OCaml tools use via files instead of command lines? |
Can I see the command line? We're here, so for now let's talking on ocaml/dune instead of ocaml/ocaml :) The compiler does not intentionally call cmd, but the only thing available to it is |
Dear Dune Team,
In the Windows build for INRIA Coq I use dune to build e.g. lablgtk. Since a short while, possibly since switching to OCaml 4.08 (from 4.07) I get strange errors about long command lines. e.g.:
The build does suceed if I reduce the path by one character from
C:\bin\cygwin_coq64_ltac2_array
toC:\bin\cygwin_coq64_ltac2_arra
. This is reproducible.I am quite sure that I did use much longer path names recently. The only thing I know has been changed is the switch to OCaml 4.08, but of cause Coq is a large project with many contributors. If this helps I can provide one click batch files which setup cygwin and build for the good and for the bad case on Windows. In case you think it could indeed be the switch to OCaml 4.08 I could also retest with OCaml 4.07 (it is a bit of work cause of the substantially different build procedures for OCaml 4.07 and 4.08 on Windows).
Btw.: I tested this with dune 2.0.0 and dune 2.1.0.
The text was updated successfully, but these errors were encountered: