make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command line limit in mingw-make


From: Eli Zaretskii
Subject: Re: command line limit in mingw-make
Date: Fri, 25 May 2012 17:08:08 +0300

> Date: Fri, 25 May 2012 14:19:59 +0100
> From: Joe Burmeister <address@hidden>
> 
> Next time I hit it was an odd one that took me a while to find. The 
> 8192nd character of the argument characters was being deleted when g++ 
> was being called by mingw-make.
> That character was the D part of the a command line define. So 
> "-Dsomething" became "-something" and g++ was erroring out about an 
> invalid option.
> 
> The call to g++ was from a temporary batch file that mingw-make had made.
> So I made a custom mingw-make that padded around the 8192nd character, 
> and things built.
> 
> But this made me uncomfortable. Everything said the limit should be 8191 
> characters. So I dug deeper. There is no limit. You can keep adding 
> characters until when you call the app it doesn't run, causing the error 
> "The system cannot execute the specified program". For console apps that 
> was 32733 arg characters, for gui apps it's 32757, which makes sense as 
> they are different sub-systems in Windows. Every 8k boundary a character 
> was dropped.

That sounds like some bug somewhere.  Can you take a peek at the
temporary batch file while it runs, and see if the command line is
written correctly there?  I'd like to make sure Make isn't where that
bug is.

> I think better is to change mingw-make so that it doesn't create a 
> temporary batch file but uses CreateProcess to get access to the 64k 
> limit.

Make already does that, but only if the command line does not include
characters special for the shell, like redirection, pipes, etc.  Can
you show the command line, so that we could understand which part(s)
thereof triggered the use of a batch file?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]