[wg-windows] mingw, ocamlopt and "input line is too long"

Andreas Hauptmann andreashauptmann at t-online.de
Thu Jul 7 12:26:52 BST 2016

On Thu, 7 Jul 2016 12:37:47 +0200
Alain Frisch wrote:

> On 07/07/2016 12:27, Andreas Hauptmann wrote:
> > However there are at least two problems:
> > - the decision to use bash or not is based on a gross estimation,
> > not the real command line length (It looks at your object files,
> > not your include directories)  
> Indeed, and this is now fixed in the development version.
> https://github.com/alainfrisch/flexdll/commit/2bac9b8153b2e98880545f86c43590f905afe427

it still needs to be fixed at least here:

> > - The wrong quote function is used to write the shell script
> > (Filename.quote quotes for cmd, not a unix shell,...)  
> Do you have a reproduction case for this one?

Yes, I know, it probably won't happen in practice, because everybody
uses 'normal' filenames. But as soon as your string contains something,
that is interpreted by bash.....

let cmd = "mkdir -p " ^ (Filename.quote "fo${PATH}bar") in
let ch = open_out_bin "foo" in
let () = output_string ch cmd in
let () = close_out ch in
let res = Sys.command "bash foo" in
assert ( res = 0 )

More information about the wg-windows mailing list