[sr #110377] AC_CACHE_CHECK is affected by 's' variable override.

2020-11-16 Thread Zack Weinberg
Follow-up Comment #3, sr #110377 (project autoconf):

Indeed, that was never guaranteed to work.  AC_PREPROC_IFELSE is the
recommended way to write that kind of test.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110377] AC_CACHE_CHECK is affected by 's' variable override.

2020-11-16 Thread Sergei Trofimovich
Follow-up Comment #2, sr #110377 (project autoconf):

Your fix helped, thank you!

The only other tweak I had to do was to avoid here-document split across
multiple expressions:


AS_IF([! $CC -E -xc - 

___
  Сообщение отправлено по Savannah
  https://savannah.gnu.org/




[sr #110377] AC_CACHE_CHECK is affected by 's' variable override.

2020-11-16 Thread Zack Weinberg
Update of sr #110377 (project autoconf):

  Status:None => Done   
 Open/Closed:Open => Closed 

___

Follow-up Comment #1:

Thanks for catching this!  Fixed in b7e32b4dc746ea867ed68f41d767178b34cc43a0.

I hope to make the final release of 2.70 before the end of November; if you
could please re-test with git trunk ASAP and report those other issues you
mentioned, I'd appreciate it.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110377] AC_CACHE_CHECK is affected by 's' variable override.

2020-11-16 Thread Sergei Trofimovich
URL:
  

 Summary: AC_CACHE_CHECK is affected by 's' variable override.
 Project: Autoconf
Submitted by: slyfox
Submitted on: Mon 16 Nov 2020 11:42:31 AM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
Operating System: None

___

Details:

Initial failure happens on ruby git version against autoconf-2.69d. It has a
few issues, but I'm focusing here on redefinition of `s` variable.

Here is a minimal example that demonstrates a problem of substituted variable.
If does not show behaviour difference in minimal snippet, but points at
mangled printf argument.


$ autoreconf-2.69 --install && ./configure --host=x86_64-pc-linux-gnu
checking size of int... 1
rbcv_sizeof_size is defined as 42
ac_cv_sizeof_int=1
configure: creating ./config.status



$ autoreconf-2.70_beta3 --install && ./configure --host=x86_64-pc-linux-gnu
./configure: line 1716: printf: `r': invalid format character
./configure: line 1717: printf: `r': invalid format character
./configure: line 1724: printf: `r': invalid format character
./configure: line 1725: printf: `r': invalid format character
rbcv_sizeof_size is defined as 42
ac_cv_sizeof_int=1
configure: creating ./config.status



$ cat configure.ac
AC_INIT

dnl trimmed douwn version of orifginal 'RUBY_CHECK_SIZEOF' macro
dnl from
https://github.com/ruby/ruby/blob/master/tool/m4/ruby_check_sizeof.m4
dnl
dnl The important bit is 's' m4 variable that breaks printf call.
AC_DEFUN([RUBY_CHECK_SIZEOF],[
AS_VAR_PUSHDEF([s], [rbcv_sizeof_size])dnl
AC_CACHE_CHECK([size of $1], [AS_TR_SH([ac_cv_sizeof_$1])],
[AS_TR_SH(ac_cv_sizeof_$1)=1])

# fake use of 's' for illustratve purposes:
s=42
echo "s is defined as ${s}"

AS_VAR_POPDEF([s])
])

RUBY_CHECK_SIZEOF(int)
echo "ac_cv_sizeof_int=${ac_cv_sizeof_int}"

AC_OUTPUT





___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/