[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cygwin breakage

From: Gary V. Vaughan
Subject: Re: cygwin breakage
Date: Mon, 18 Oct 2004 09:51:08 +0100
User-agent: Mozilla Thunderbird 0.8 (Macintosh/20040913)

Hi Noah,

Noah Misch wrote:
On Sat, Oct 16, 2004 at 12:29:33AM -0400, Charles Wilson wrote:
during mdemo-make (after mdemo-conf):

/bin/sh ./libtool --mode=link --tag=CC gcc -g -O2 -o -rpath /usr/src/libtool/devel/CVS/libtool-b20-temp/.build/tests/_inst/lib -no-undefined -module -export-symbols-regex "libfoo2.*" foo2.lo
libtool: link: generating symbol list for `'
/usr/bin/nm -B .libs/foo2.o | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | /usr/bin/sed -e '/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/' | /usr/bin/sed -e '/^[AITW] /s/.* //' | sort | uniq > .libs/libfoo2.exp
grep -E -e "libfoo2.*" ".libs/libfoo2.exp" > ".libs/libfoo2.expT"
mv -f ".libs/libfoo2.expT" ".libs/libfoo2.exp"
eval: 1: Syntax error: "then" unexpected
if test xlibfoo2_LTX_foo2 = xEXPORTS
make[4]: *** [] Error 2

Attached, the libtool for this build.

Not to crash any Virtual PC parties, but here is a shell trace of the failure:

+ func_quote_for_eval if test "x`/usr/bin/sed 1q .libs/libfoo2.exp`" = xEXPORTS; then cp 
.libs/libfoo2.exp .libs/cygfoo2-0.dll.def; else echo EXPORTS > .libs/cygfoo2-0.dll.def; cat 
.libs/libfoo2.exp >> .libs/cygfoo2-0.dll.def; fi
+ my_arg=if test "x`/usr/bin/sed 1q .libs/libfoo2.exp`" = xEXPORTS; then cp 
.libs/libfoo2.exp .libs/cygfoo2-0.dll.def; else echo EXPORTS > .libs/cygfoo2-0.dll.def; cat 
.libs/libfoo2.exp >> .libs/cygfoo2-0.dll.def; fi
+ my_arg="if test "x`/usr/bin/sed 1q .libs/libfoo2.exp`" = xEXPORTS; then cp 
.libs/libfoo2.exp .libs/cygfoo2-0.dll.def; else echo EXPORTS > .libs/cygfoo2-0.dll.def; cat 
.libs/libfoo2.exp >> .libs/cygfoo2-0.dll.def; fi"
+ func_quote_for_eval_result="if test "x`/usr/bin/sed 1q .libs/libfoo2.exp`" = xEXPORTS; then 
cp .libs/libfoo2.exp .libs/cygfoo2-0.dll.def; else echo EXPORTS > .libs/cygfoo2-0.dll.def; cat 
.libs/libfoo2.exp >> .libs/cygfoo2-0.dll.def; fi"
+ eval $show ""if test "x`/usr/bin/sed 1q .libs/libfoo2.exp`" = xEXPORTS; then cp 
.libs/libfoo2.exp .libs/cygfoo2-0.dll.def; else echo EXPORTS > .libs/cygfoo2-0.dll.def; cat .libs/libfoo2.exp 
>> .libs/cygfoo2-0.dll.def; fi""
+ /usr/bin/sed 1q .libs/libfoo2.exp
+ echo if test xlibfoo2_LTX_foo2 = xEXPORTS
if test xlibfoo2_LTX_foo2 = xEXPORTS
eval: 1: Syntax error: "then" unexpected

The two pairs of quotes cancel, so the variable expansion evals unprotected.

-eval \$show \"$func_quote_for_eval_result\"
+eval \$show "$func_quote_for_eval_result"

plugs the failure in this case, but I think it unfixes the problem Peter was
trying to fix.  Indeed, ``$show "$my_arg"'' is equivalent.  Hmmm.

I had come to the same conclusion, and after *a lot* of buggering about with quote substitution and sed in func_quote_for_eval managed to come up with the sed magic needed to protect the expression returned in $func_quote_for_eval_result from early expansion...

As it turns out, your untested patch at:

is a much better generalised analysis and cleaner patch that mine.

As I had hoped, this also paves the road to cleaning up all the $show/$run cruft on HEAD. Excellent catch!

I've successfully run the testsuite on my powerbook, and the failing
mdemo tests are now working on cygwin. To be doubly sure there are no regressions, I am running the entire testsuite on cygwin before I commit. I expect it to take another 12-18 hours for that to complete
(assuming Windows 98 can stay up that long under heavy processor load ;-)).

Gary V. Vaughan      ())_.  address@hidden,}
Research Scientist   ( '/
GNU Hacker           / )=
Technical Author   `(_~)_

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]