This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: CT 0.29 - stuck compiling gcc 4.0 glibc 2.2.5 ppc405: execvp:/bin/sh: Resource temporarily unavailable


Martin Egholm Nielsen wrote:
I'm almost there - but it gets stuck when it should install gcc's multilibs.
Anybody got a clue to what causes the unavailability?


make[4]: execvp: /bin/sh: Resource temporarily unavailable
make[4]: *** [all-multi] Error 127
make[4]: Leaving directory `/cygdrive/c/DATA/crosstool-0.29/build/powerpc-405-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-gcc/powerpc-405-linux-gnu/nof/zlib'

This old thread reports a similar problem: http://sources.redhat.com/ml/cygwin/2001-07/msg01333.html

He blames the command length when running under Cygwin...
Unfortunately there is no solution to the problem - other than changing to Linux...

The limit appears to be enforced in winsup/cygwin/spawn.cc:


static int __stdcall
spawn_guts (const char * prog_arg, const char *const *argv,
            const char *const envp[], int mode)
{
      ...
      if (one_line.ix > 32767)
        {
          debug_printf ("Command line too long (>32K), return E2BIG");
          set_errno (E2BIG);
          return -1;
        }

msdn says in
http://msdn.microsoft.com/library/en-us/dllproc/base/createprocess.asp

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.
        Windows 2000:  The maximum length of this string is MAX_PATH characters.

So it appears to be a Windows limitation, not a Cygwin one.

You have a couple options, in increasing order of difficulty:

1) switch to linux or some other real OS, like mac os x (putty is your friend, you can keep
your windows workstation, just remote log in to the other box)
2) cross-compile the cygwin toolchain from linux
3) patch gcc's build to use shorter commandlines
4) patch cygwin to bypass the windows commandline mechanism


I could be wrong; you might want to check with the cygwin folks. - Dan

--
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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