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: Joe Burmeister
Subject: Re: command line limit in mingw-make
Date: Fri, 25 May 2012 15:57:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 25/05/12 15:08, Eli Zaretskii wrote:
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.

Looks like I didn't put one aside.
I'll get one, but it requires me to rebuild qt5, again, which isn't a small thing to build.

But the line looks correct, other than being crazy long. Attached is a zip with the problem demo'ed outside of make.



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?
I've just grabbed a short one as qt5 builds. It's just:

"
@echo off
g++ -c -include tmp\obj\debug_shared\qt_pch.h -fno-keep-inline-dllexport -g -Wall -frtti -fexceptions -mthreads -DQT_SHARED -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DQT_DLL -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"..\..\include\QtCore\5.0.0" -I"..\..\include\QtCore\5.0.0\QtCore" -I"..\..\include\QtCore" -I"..\..\include" -I"..\..\include\QtNetwork\5.0.0" -I"..\..\include\QtNetwork\5.0.0\QtNetwork" -I"..\..\include\QtNetwork" -I"..\..\include" -I"tmp\rcc\debug_shared" -I"tmp" -I"..\3rdparty\zlib" -I"kernel" -I"tmp\moc\debug_shared" -I"c:\MinGW\include" -I"c:\MinGW\msys\1.0\local\include" -I"..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\qnetworkreplyfileimpl.o access\qnetworkreplyfileimpl.cpp
"

From what you just told me, I don't see why this would trigger a intermediate batch file like this.

It's the mingw32-make I got from the mingw install.

mingw32-make -v gives:

GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.



Joe

Attachment: test.zip
Description: Zip archive


reply via email to

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