tech-pkg archive

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

Re: recent x changes, solaris compiler-options-with-spaces,



On Mon, Jun 04, 2012 at 09:00:35PM -0400, Greg Troxel wrote:
> 
>   Thmoas wrote:
> 
>   On Mon, Jun 04, 2012 at 11:23:50AM +0200, J?rn Clausen wrote:
>   > What's the status of this problem? I get the same error
>   > 
>   > checking if cc -std=gnu99 supports -Werror=implicit... no
>   > checking if cc -std=gnu99 supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN
>   > -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... eval: 1: Syntax error: Bad
>   > substitution

I suspect I've found it - it is probably bug in the configure script.

The failing line is (split up a bit}:
        if {
                as_var=`$as_echo "$cacheid" | $as_tr_sh`;
                eval \${$as_var+:} false;
        }; then :
The failure happens on the third line when $as_var contains spaces.

Now $cacheid is the two options, so is effectively 'a b'.

$as_tr_sh is eval sed 
'y%*+%pp%;s%[^_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]%_%g'
and is supposed to replace all characters that invalid in variable names
with an '_'.
So the problem is with $as_echo.

There is a whole load of pooage to set $as_echo, it might just be 'echo'
but it can be some very horrid things!
I suspect that one of them is generating 2 lines of output, possibly
some version of printf losing the quoting.
(The shere number of 'eval' lurking doesn't help sorting out the quoting!)

Then the sed command processes two lines of input - and leaves the '\n',
so as_var would contain "a\nb".
IFS is then applied when $as_var is substituted, replacing the '\n'
with a ' '.

Would be useful to know what as_echo is actually set to on the
failing systems.

(I just built it on amd64 current without any issues.)

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index