Subject: Re: libtool generates binary data in config.log due to buggy escaping

From: Vincent Lefevre <[email-masked]>
Date: Tue, 2 Oct 2018 12:58:04 +0200

retitle 21309 libtool should not use the dangerous, undocumented AC_TRY_EVAL macro, currently broken
thanks

On 2018-10-02 11:12:52 +0200, Vincent Lefevre wrote:
> In libtool.m4, this corresponds to:
> 
>     nlist=conftest.nm
>     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
> 
> Thus the problem seems to come from AC_TRY_EVAL, i.e. an autoconf bug.

I've seen in the autoconf source that AC_TRY_EVAL should not be used:

# AC_TRY_EVAL(VARIABLE)
# ---------------------
# Evaluate $VARIABLE, which should be a valid shell command.
# The purpose of this macro is to write "configure:123: command line"
# into config.log for every test run.
#
# The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
# undocumented, and should not be used.
# They may be removed or their API changed in a future release.
# Autoconf itself no longer uses these two macros; they are present
# only for backward compatibility with previous versions of Autoconf.
# Not every shell command will work due to problems with eval
# and quoting, and the rules for exactly what does work are tricky.
# Worse, due to double-expansion during evaluation, arbitrary unintended
# shell commands could be executed in some situations.

-- 
Vincent Lefèvre <[email-masked]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)