This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Strange make [Error 255] (cygwin bug?)
On Thu, Sep 25, 2003 at 09:14:09AM -0400, Igor Pechtchanski wrote:
> On Thu, 25 Sep 2003, Corinna Vinschen wrote:
> > "make bug"? I'm getting this on Linux:
> >
> > make: execvp: /bin/sh: Argument list too long
> > make: *** [all] Error 127
> >
> > Doesn't look like a bug at all to me.
> >
> > Corinna
>
> Urp. What I meant was "if it fails in the same way on Linux". The above
> looks like a legitimate error message. FWIW, I just tried it on a RedHat
> 7.3 machine, and I'm getting the same error as Corinna. Now that you
> mention it, it could be that Cygwin's /bin/sh is exiting with status 255
> on an overlong argument list, and this has nothing to do with make per
> se... Although all of
>
> for sh in /bin/sh /bin/ksh /bin/bash /bin/tcsh; do
> perl -e 'print "all:;\t\@true && echo \$\$SHELL && \\\n"; foreach $i (0000..9999) { print "\techo -n $i && \\\n"; } print "\techo && true\n";' | make -f - SHELL=$sh
> done
>
> printed "make: *** [all] Error 255", so I doubt it's a specific shell's
> behavior... This is obviously Cygwin-specific, though.
Why so complicated?
A simple strace shows that the native Windows call CreateProcess() fails
with error 87.
$ net helpmsg 87
The parameter is incorrect.
Another simple look into MSDN for the CreateProcess call reveals:
lpCommandLine
[in, out] Pointer to a null-terminated string that specifies the
command line to execute. The maximum length of this string is 32K
characters.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/