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

Andre Maroneze Andre.OLIVEIRAMARONEZE at cea.fr
Thu Jul 7 08:18:09 BST 2016

Thanks, using those flags it shows useful information:

- A call to i686-w64-mingw32-as, with a short command line, that succeeds;
- A call to flexlink, also with a short command line, using a response 
file (@C:\cygwin32\tmp\camlresp0050ba);
- And then several lines:

** Use cygpath: true
** Search path: .... (lots of directories, one per line)
** Default libraries: ... (some -l<lib> followed by corresponding lines 
"** open: .../lib/<lib>.a")
+ i686-w64-mingw32-gcc -mconsole -shared -Wl,-e_FlexDLLiniter at 12  ... 
(lots of -I and -L, plus some extra flags, and this line is slightly 
larger than 8k characters)
La ligne de commande est trop longue.
** Fatal error: Error during linking

So it's that call to i686-w64-mingw32-gcc that fails. Is there a way to 
use a response file for that command as well?


On 07/06/2016 10:00 PM, Andreas Hauptmann wrote:
> Hi,
> On Wed, 6 Jul 2016 20:45:41 +0200
> Andre Maroneze wrote:
>> Has someone else also encountered this problem when compiling on
>> Windows with a MinGW-based OCaml?
> It's probably not your own command, that is too long, but a command
> that is internally created by flexlink (or ocamlopt)
> (See for example: https://github.com/alainfrisch/flexdll/issues/7 )
> Compile it with:
> export FLEXLINKFLAGS='-v -v -v'
> export OCAMLPARAM='_,verbose=1'
> ocamlfind ocamlopt ...
> then ocamlopt/ocamlc should print, which external commands they call to
> stderr. And flexlink will also print some debug output.
> With this information we can hopefully locate the point at which the
> wrong command is generated.
> _______________________________________________
> wg-windows mailing list
> wg-windows at lists.ocaml.org
> http://lists.ocaml.org/listinfo/wg-windows

André Maroneze
Ingénieur-chercheur CEA/LIST
Laboratoire Sûreté et Sécurité des Logiciels

More information about the wg-windows mailing list