This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange make [Error 255] (cygwin bug?)


On Thu, Sep 25, 2003 at 03:40:36PM +0200, Corinna Vinschen wrote:
>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.

How come cygwin isn't setting an errno appropriately, then?  Shouldn't
it be reflected by make?

In any event, this might help:

mount -f -X c:/cygwin/bin /bin
mount -f -x c:/cygwin/bin/strace.exe /bin/strace.exe
mount -f -x c:/cygwin/bin/cygcheck.exe /bin/cygcheck.exe

since telling cygwin that the files are all cygwin-aware should make cygwin
bypass the standard windows command line stuff.

cgf

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]