configure bug in binutils 2.9.1 and egcs 1.0.3a on FreeBSD
Marty Leisner
leisner@sdsp.mc.xerox.com
Mon May 18 09:28:00 GMT 1998
> I am using FreeBSD 2.2.6, and its sh is finnicky about test expressions.
> This bug shows up on this platform when you configure either binutils 2.9.1
> or egcs 1.0.3a and have something like CFLAGS=-g in the environment.
>
> The manifestation is seeing `[: syntax error' messages mysteriously several
> times throughout the configure run. Using sh -x, I traced it to some
> instances of `if [ -z "$CFLAGS" -a -r Makefile ]' and the like. It so
> happens that $CFLAGS is -g, and the FreeBSD sh gives an error for
> `[ -z -g -a -r Makefile ]' and other such constructions like
> `[ -z -g -a -n foo ]' (though, oddly, not for `[ -z -g ]' alone).
>
> The fix I would recommend to work around this is to replace uses of
> -z and -n with = and != tests, as in `[ "x$CFLAGS" = x ]'.
>
> Note that invoking configure with bash does not alleviate the problem,
> because someplace in the bowels of configure sees fit to reinvoke itself
> with `eval /bin/sh configure ...'.
>
>
> Thanks,
> Roland
Did you try:
CONFIG_SHELL=/usr/local/bin/bash bash ./configure
I think that may help recursive configures...
--
marty
leisner@sdsp.mc.xerox.com
The Feynman problem solving Algorithm
1) Write down the problem
2) Think real hard
3) Write down the answer
Murray Gell-mann in the NY Times
More information about the Gcc-bugs
mailing list