This is the mail archive of the cygwin-apps@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: Pending patches for generic build script


Igor Pechtchanski wrote:

Ok, great!  Since you're in favor of it (and you're the ultimate authority
on the gbs, I'm just temporarily handling the maintainer duties), it makes
me much more confident.  I'll let Rafael test out the propagation of "set
+e" into functions, and then make the appropriate change.

'Kay.


just configure with bash as my shell...the problem never seems to appear
when using bash.


WAG: this could be related to some malloc() bug, which manifests as a
failure in the shell's pattern matching implementation...  Can you
reproduce this under strace?

No, and I've tried. The problem is, it only seems to occur when running configure where configure's shell is sh -- and configure takes a LONG time to get there, launching so many subprocesses...it's unmanageable (multimegabytes of strace output, takes hours to run on my poor box). And then, the problem is non-deterministic, so it doesn't always occur -- and didn't occur, the few times I tried to strace.


Anyway, the problem is in launching the "reject feature names that are not valid shell variables" test:
expr "x$ac_feature : ".*[^-_$as_cr_alnum]" > /dev/null &&
<!print error message and exit!>
And expr is not a shell builtin, so I really can't explain why simply configuring from bash "works" and sh "sometimes doesn't work". It just is.


I think Nicholas also ran into this issue -- Nick, care to comment?

>>don't need the subshell -- because 'pushd' is available. (Yes, I know

#!/bin/bash
set +e
...
mkdirs() {
  set +e
  cd ${topdir}
  rm -fr ${objdir} ${instdir} ${srcinstdir} || true
  mkdir -p ${objdir}
  mkdir -p ${instdir}
  mkdir -p ${srcinstdir}
}

Arg. make that


mkdirs() {
   set +e
   pushd ${topdir}
   rm -fr ${objdir} ${instdir} ${srcinstdir} || true
   mkdir -p ${objdir}
   mkdir -p ${instdir}
   mkdir -p ${srcinstdir}
   popd
}

I think I'll wait until all the others' patches have been applied, though,
and then do it in one shot as one big change.

'Kay.


--
Chuck



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