Re: command line limit in mingw-make

Joe Burmeister <[email protected]> Tue, 18 Sep 2012 09:28:13 +0100
Newsgroups gmane.comp.gnu.make.windows
Message-ID <[email protected]>
On 02/09/12 12:26, Jonathan Liu wrote:
> On 26/05/2012 4:05 AM, Eli Zaretskii wrote:
>>> Date: Fri, 25 May 2012 17:04:12 +0100
>>> From: Joe Burmeister<[email protected]>
>>> CC: [email protected]
>>>
>>>>>     From what you just told me, I don't see why this would trigger a
>>>>> intermediate batch file like this.
>>>> I'm guessing those are the quotes.
>>> that will be why it's pretty much everything. No doubt they are added
>>> for spaces safety.
>>>
>>> A quick test with CreateProcess seams to show it's not necessary for
>>> this to trigger an intermediate batch file.
>>
>> Probably.  Can you try building make.exe with MinGW, after removing
>> the " character from sh_chars_dos[] defined on job.c under WINDOWS32?
>>
>> (Building a MinGW Make requires to run the build_w32.bat batch file;
>> see the file README.W32 for instructions.)
>
> I have removed the " character from sh_chars_dos and it works.
> I can now build qt5 qtwebkit which has really long command lines (around
> 12000 characters long). Also, quoted filenames that have spaces still
> work fine in Makefiles.
>
> Could this be change applied to CVS?
>
> Regards,
> Jonathan

The other got ya with qt5 is windres.exe.
It uses MS's popen, which calls cmd.exe and thus introduces a 8k limit.
This would mean qtdeclarative wouldn't build for me.
My solution was to change windres.exe to use a custom popen on Windows, 
one that calls CreateProcess with the command line directly, accessing 
the higher 32k limit.

Anyway, really pleased there is progress on this. :-)


Joe