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

David Allsopp dra-news at metastack.com
Thu Jul 7 20:40:37 BST 2016

Alain Frisch wrote:
> On 07/07/2016 13:26, Andreas Hauptmann wrote:
> > Thanks,
> > it still needs to be fixed at least here:
> > https://github.com/alainfrisch/flexdll/blob/2aa2c0e22aa37515617245065c
> > dbfee7108fc172/reloc.ml#L164
> Are you sure?  This goes through get_output, which already had the logic
> to use bash for long command line.
> > 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.....
> Ok.  Considering the effort David had to deploy to "get quoting right",
> I'd prefer to focus on more immediate issues.  Ideally, all the process
> invocation logic that David has been working on could be reused in
> flexlink; one tricky point is that in order to simplify bootstrapping, I
> avoided any non-stdlib dependency for flexlink (including Unix).

Especially if stdout, stderr and stdin don't need to be controlled, it's just a matter of wrapping CreateProcess directly - it could be almost lifted straight out of otherlibs/win32unix/createprocess.c

Though I'd hang on until the implementation in OPAM has been battle-tested some more ;o)


More information about the wg-windows mailing list