cygwin build_alias issue (and a possible workaround...)

Scott Newell newell at cei.net
Fri Sep 3 20:39:22 UTC 2004


At 03:05 PM 9/3/2004 , Bogdan Vacaliuc wrote:
>
>Lets recap what we know.
>
>4) If strace is used on the configure/build, the failure never occurs.

I was able to strace the failing expr call.  (But not the entire
configure/build).


>I thought I would attempt to avoid using strace, while looking at the
>inputs, outputs and status of all calls to 'expr'.  I created the following
>script placed in ~/bin/expr
>
>#!/bin/sh
>if result=`/usr/bin/expr "$@"` ; then
>    echo "expr $@ result $result status 0" >> ${HOME}/expr.log
>    echo $result
>    exit 0;
>else
>    echo "expr $@ result $result status !0" >> ${HOME}/expr.log
>    echo $result
>    exit 1;
>fi

I tried this script (in /opt/rtems-4.6/bin, which is the first entry in my
path).  I observed no log file created in my home directory, and the output
of my configure and make commands was not visible in the console window.
(I usually use something like ../rtems-4.6.1/configure --target=m68k-rtems
--disable-posix --disable-networking --disable-cxx --enable-rtemsbsp=efi332
2>&1 | tee -a log.txt for the configure step and gmake RTEMS_BSP=efi332
2>&1 | tee -a log.txt for the make step).

Deleting your expr script from the rtems binary directory allowed the
configure and make to complete my normal process, ending in the build_alias
error.


>Scott, Gene, everyone, does this work for all of you and is it an acceptable
>(temporary) workaround?

It does not work for me, yet.  Maybe I've mis-applied the script?  Here's
the tail end of my configure/make logfile:

../rtems-4.6.1/configure --target=m68k-rtems --disable-posix
--disable-networking --disable-cxx --enable-rtemsbsp=efi332 2>&1 | tee -a
log.txt
      5 [main] sh 3476 sync_with_child: child 3596(0x68) died before
initialization with status code 0x80
    141 [main] sh 3476 sync_with_child: *** child state waiting for longjmp
./configure.lineno: Cannot fork: Resource temporarily unavailable
gmake RTEMS_BSP=efi332 2>&1 | tee -a log.txt
gmake: *** No targets specified and no makefile found.  Stop.


>Can it be possible that the issue resides in (v)fork(), exec*, spawn()
>called from bash?  As Ralf and Chris have suggested that somehow the

>arguments are not making it to expr correctly?  This is difficult to know,

The strace of the failing expr shows:
  596   26387 [main] expr 3764 build_argv: argv[0] = 'expr'
  121   26508 [main] expr 3764 build_argv: argv[1] = 'xbuild_alias'
  101   26609 [main] expr 3764 build_argv: argv[2] = ':'
and a little later:
  330   30918 [main] expr 3764 globify: argv[3] =
'.*[^_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]'
  193   31111 [main] expr 3764 build_argv: argc 4


>since with the above script in the way the problem disappears (again).
>Still the whole copy-on-write of fork()/exec() for processes has been a
>stickler for Cygwin in the past.
>
>Sigh.  I'm tired of this thing.

Already?  And I was thinking that we were just getting started...


--
newell




More information about the users mailing list