[Top][All Lists]

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

Re: openmpi: FTBFS: Compilation errors

From: Eric Blake
Subject: Re: openmpi: FTBFS: Compilation errors
Date: Fri, 08 Oct 2010 16:41:39 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4

On 08/18/2010 11:31 AM, Ralf Wildenhues wrote:

[ http://bugs.debian.org/592892 ]

If I got above right, then I'm cloning this bug for Autoconf and
marking it as upstream bug; adding bug-autoconf in Cc:.

* Sebastian Andrzej Siewior wrote on Wed, Aug 18, 2010 at 04:53:44PM CEST:
The value should be set in third last line

| $2=AS_VAR_GET([type_var])

It was transformed earlier into
| ofc_type_alignment=$ompi_cv_f77_alignment_LOGICALp1
but become something totally differnt,

|ofc_type_alignment=`eval 'as_val=${'type_var'};$as_echo "$as_val"'`

The problem here is that the string:


is not a shell literal (it contains a globbing character, so unless you use it in a quoted context or do the transliteration yourself, we can't guarantee that the shell code would be safe). Meanwhile, AS_LITERAL_IF, which forms the backbone of AS_VAR_PUSHDEF, was documented in 2.66 as being tightened to be more conservative about what it considers as a shell literal.

Well, AS_VAR_GET is (intentionally) undocumented, so your use of
AS_VAR_COPY is the right thing to do (which is why I'll leave the
original bug for openmpi).  Still, this is a regression in upstream
Autoconf that I think should be fixed.  The issue is that '*' needs to
be translated to 'p' here and the string treated as literal here:

     AS_VAR_PUSHDEF([type_var], [ompi_cv_f77_alignment_$1])

You are correct that using AS_VAR_COPY works around the problem. However, you are also correct that autoconf 2.65 would transliterate the * at m4 time (treating it as a literal) while 2.66 saves the transliteration for shell time (treating it as a variable indirection).

Unfortunately, I don't see any way to make autoconf revert back to the 2.65 behavior without losing the additional safety that was documented in the change for AS_LITERAL_IF being more picky about what forms a literal. So, all I can suggest is that OMPI_F77_GET_ALIGNMENT do the transliteration in advance:

    m4_translit([[ompi_cv_f77_alignment_$1]], [*], [p]))
  AS_VAR_SET([$2], [type_var])

at which point, because you did the transliteration yourself, the AS_VAR_PUSHDEF can once again detect that it has a literal at m4 time and avoid the extra layer of shell indirection.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

reply via email to

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