From 61931ed5dc714957bdd613d3fb382d41b9080e83 Mon Sep 17 00:00:00 2001 From: Joshua Daniel Franklin Date: Sun, 8 May 2005 19:43:35 +0000 Subject: [PATCH] * how-programming.texinfo: Replace MAKE_MODE entry with FAQ about execvp errors and cygexec. --- winsup/doc/ChangeLog | 5 ++++ winsup/doc/how-programming.texinfo | 48 ++++++++++++++++-------------- winsup/doc/textbinary.sgml | 2 +- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index a26525b3a..0ea7f99ac 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,8 @@ +2005-05-08 Joshua Daniel Franklin + + * how-programming.texinfo: Replace MAKE_MODE entry with FAQ about + execvp errors and cygexec. + 2005-04-20 Brian Dessent * pathnames.sgml (mount-table): Indicate that user-specific diff --git a/winsup/doc/how-programming.texinfo b/winsup/doc/how-programming.texinfo index f8a6150e3..3003ff7c3 100644 --- a/winsup/doc/how-programming.texinfo +++ b/winsup/doc/how-programming.texinfo @@ -50,35 +50,37 @@ building it, and once built there were problems using it. It appears that there is only minimal support for the Objective C front-end in the main GCC distribution, anyway. -@subsection Why is make behaving badly? +@subsection Why does my make fail on Cygwin with an execvp error? First of all, if you are using @samp{make -j[N]}, then stop. It doesn't -work well. +work well. Also beware of using non-portable shell features in your +Makefiles (see tips at @file{http://cygwin.com/faq/faq_3.html#SEC46}). + +Errors of @samp{make: execvp: /bin/sh: Illegal Argument} or +@samp{make: execvp: /bin/sh: Argument list too long} are often +caused by the command-line being to long for the Windows execution model. +To circumvent this, mount the path of the executable using the -X switch +to enable cygexec for all executables in that folder; you will also need +to exclude non-cygwin executables with the -x switch. Enabling cygexec +causes cygwin executables to talk directly to one another, which increases +the command-line limit. To enable cygexec for @samp{/bin} and +@samp{/usr/bin}, you can use these commands in a batch file: -Otherwise, read on... - -Make has two operating modes, UNIX and WIN32. You need to make sure -that you are operating in the right mode. - -In UNIX mode, make uses sh.exe as a subshell. The path list separator -is ':', '\' is the escape character, POSIX paths are expected, and -Cygwin mounts will be understood. Use this for Makefiles written for -UNIX. +@example +mount -X -b -f c:\cygwin\bin /bin +mount -X -b -f c:\cygwin\bin /usr/bin +mount -x -b -f c:\cygwin\bin\strace.exe /usr/bin/strace.exe +mount -x -b -f c:\cygwin\bin\strace.exe /bin/strace.exe +mount -x -b -f c:\cygwin\bin\cygcheck.exe /usr/bin/cygcheck.exe +mount -x -b -f c:\cygwin\bin\cygcheck.exe /bin/cygcheck.exe +@end example -In WIN32 mode, make uses the "native" command shell (cmd.exe or -command.com), with all the restrictions that implies. The path list -separator is ';', the path separator is '\', "copy" and "del" work, but -the Cygwin mount table is not understood. Use this for nmake-style -Makefiles. +Note that you must specifically exclude @code{strace} and @code{cygcheck}, +which are not linked to the Cygwin DLL. -The default mode for the Net Release of make (the one installed by -@code{setup.exe}) is UNIX. The default mode for commercial releases to -Redhat (formerly Cygnus) customers is WIN32. +(See @file{http://www.cygwin.com/cygwin-ug-net/using-utils.html#mount} +for more information.) -You can override the default by setting the environment variable -MAKE_MODE to "UNIX" (actually case is not significant) or "WIN32" -(actually anything other than "UNIX"). You can also specify the options ---unix or --win32 on the make command line. @subsection Why the undefined reference to @samp{WinMain@@16}? diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml index 15994185a..3e1274db2 100644 --- a/winsup/doc/textbinary.sgml +++ b/winsup/doc/textbinary.sgml @@ -55,7 +55,7 @@ in binary mode if any of the following conditions hold: binary mode is specified in the open call -the filename is a MS-DOS filename +the filename is a MS-DOS filename the file resides on a binary mounted partition -- 2.43.5