ocaml / ocaml/dune

Error "The command line is too long" for very short command line (<250 characters) on Cygwin/Windows

Open
#2,991 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

windows
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 17m
Merged PRs (30d)
287

Description

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.:

lablgtk-3.0.beta5-dune-build_err.txt: (cd _build/default && C:\bin\cygwin_coq64_ltac2_array\usr\x86_64-w64-mingw32\sys-root\mingw\bin\ocamlopt.opt.exe -w -40 -w -6-7-9-10-27-32-33-34-35-36-50-52 -no-strict-sequence -g -shared -linkall -I src -o src/lablgtk3.cmxs src/lablgtk3.cmxa)
lablgtk-3.0.beta5-dune-build_err.txt: The command line is too long.

The build does suceed if I reduce the path by one character from C:\bin\cygwin_coq64_ltac2_array to C:\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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported build on Cygwin/Windows using the short and one-character-shorter paths from the issue, with Dune 2.0.0 or 2.1.0. Compare the behavior across the reported OCaml 4.08 and 4.07 environments; done means the reproducible short command no longer fails as too long.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.