cygwin build_alias issue

Ralf Corsepius ralf_corsepius at rtems.org
Wed Sep 1 14:10:06 UTC 2004


On Wed, 2004-09-01 at 15:21, Scott Newell wrote:
> At 12:07 AM 9/1/2004 , Ralf Corsepius wrote:
> >
> >But ... still nobody seems to have been able to "sh -x" or strace this
> >issue, ... so all this is wild guesses.
> 
> Hmm, I thought I mentioned strace this weekend...anyway, I tried strace.
> Generated in excess of 10GB of log files, and I couldn't get it to give me
> the build_alias error a single time.
> 
> Can you give me an example of the proper way to use "sh -x"?

Some examples:
1.

$ cat gaga1.sh
#!/bin/sh
echo "hello"

$ sh -x ./gaga1.sh
+ echo hello
hello

2.

$ cat gaga2.sh
#!/bin/sh -x
echo "hello"

$ ./gaga2.sh
+ echo hello
hello

3.

$ cat gaga3.sh
#!/bin/sh
set -x
echo "hello"

$ ./gaga3.sh
+ echo hello
hello

For details: man bash :-)

As far as configure scripts are concerned, the art is to find the
appropriate places to add such constructs.

The brute force way would be to set SHELL and CONFIG_SHELL
SHELL="/bin/bash -x" CONFIG_SHELL="/bin/bash -x" <path>/configure ...

In most cases this won't work properly ;)



The expr call Chris is referring to looks like this:

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`


It can be found near to the beginning of "for"-loop located
approximately at line 300-320 in most configure scripts:

...
ac_prev=
for ac_option
do
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi
                                                                                                
  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
...

To verify if Chris suspicion is right you can try to add a 
set -x right before the "ac_prev=" of a failing configure script.

I.e. run the toplevel configure, wait for the breakdown, add the 
"set +x"  to the configure script that is reported to break,
then delete the build-tree and rerun the configure script.


Ralf





More information about the users mailing list