• Help with a syntax error from an autoreconf'ed configure script

    From John Scott@21:1/5 to All on Mon Aug 16 21:50:02 2021
    Hello,

    It seems that the upload of binutils-source 2.37 has broken my to-be-
    uploaded package binutils-sh-elf; it worked fine with binutils-source
    2.36. My package is available at https://mentors.debian.net/package/binutils-sh-elf/

    I'm looking for anyone that knows Autoconf wizardry to help sort this
    out. The Binutils sources contain many subdirectories that all need autoreconf-ing, so I call autoreconf on all of these subdirectories,
    including libiberty, in debian/rules. This still succeeds.

    At configuration time, however, we get
    Configuring in ./libiberty
    configure: creating cache ./config.cache
    checking whether to enable maintainer-specific portions of Makefiles... no
    ...
    checking for x86_64-linux-gnu-ranlib... ranlib --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so
    binutils/libiberty/configure: line 2911: syntax error near unexpected token `PLUGIN_OPTION'
    binutils/libiberty/configure: line 2911: `GCC_PLUGIN_OPTION(PLUGIN_OPTION)'

    This seems bizarre. Why would autoreconf produce a script with a syntax
    error, or is dash not robust enough to use what construct it's trying
    in the script? I could not find an upstream issue about this.

    Note that in my build log above, I'm using GCC 11, but I don't think
    this is related to the issue at hand. If it were to turn out that GCC
    11 is the culprit, this needs to be addressed anyway.

    Thanks for your time.
    John

    -----BEGIN PGP SIGNATURE-----

    iIgEABYKADAWIQT287WtmxUhmhucNnhyvHFIwKstpwUCYRrANRIcanNjb3R0QHBv c3Rlby5uZXQACgkQcrxxSMCrLacR4gEA9BwOGdS4SigAB3+3wBE1MOOYSGlNmrUa tWXo2xyalloA/AgOgaqEayA4Lq1rb2VCt+4SlQCBeANr6w+o2ML+BHcP
    =9/Rf
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wferi@niif.hu@21:1/5 to John Scott on Mon Aug 23 17:00:02 2021
    John Scott <jscott@posteo.net> writes:

    binutils/libiberty/configure: line 2911: syntax error near unexpected token `PLUGIN_OPTION'
    binutils/libiberty/configure: line 2911: `GCC_PLUGIN_OPTION(PLUGIN_OPTION)'

    This seems bizarre. Why would autoreconf produce a script with a syntax error, or is dash not robust enough to use what construct it's trying
    in the script?

    I guess GCC_PLUGIN_OPTION (which is meant to be an Autoconf/m4 macro) is
    not defined in this case for some reason, so it's passed verbatim into
    the configure script by Autoconf and later misinterpreted by the shell
    as a function definition. Try to find out why it (and PLUGIN_OPTION)
    isn't defined in the failing case; it should be provided by config/gcc-plugin.m4, I think.
    --
    Regards,
    Feri

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)