Strange make [Error 255] (cygwin bug?)

Corinna Vinschen
Thu Sep 25 13:41:00 GMT 2003

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:

    [in, out] Pointer to a null-terminated string that specifies the
    command line to execute. The maximum length of this string is 32K


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list