ac-wrapper.sh find_binary definition contains syntax errors which results in the script erroneously printing variations of: ac-wrapper: autoconf: warning: auto-detected versions not found ( ); falling back to latest available Reproducible: Always
What syntax errors? This is a pretty vague report, you're only giving the symtom even when you say you've found the cause...?
Created attachment 805207 [details, diff] ac-wrapper.path A patch for the script that silences the reported error.
There is no syntax error in 'for v ; do' line. POSIX (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_03) says: > The format for the for loop is as follows: > > for name [ in [word ... ]] > do > compound-list > done > > ... > > ... Omitting: > > in word... > > shall be equivalent to: > > in "$@"
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #3) > There is no syntax error in 'for v ; do' line. The full definition of find_binary() is: find_binary() { local v all_vers="${all_vers} $*" # For error messages. for v ; do if [ "${v}" = "2.1" ] ; then v="2.13" fi if [ -x "${full_argv0}-${v}" ] ; then binary="${full_argv0}-${v}" binary_ver=${v} return 0 fi done return 1 } If the goal is to walk all_vers, then the for-loop is incorrect. If the goal is not to walk all_vers, why is it being defined in find_binary()? Furthermore, why is /usr/bin/autoconf wrapped with a shell script anyway? This is certainly not the behavior I expected when I ran autoconf.
(In reply to nvinson234 from comment #4) > Furthermore, why is /usr/bin/autoconf wrapped with a shell script anyway? > This is certainly not the behavior I expected when I ran autoconf. autoconf (and automake) are slotted and we need a way to choose which to use via say, the eclass, if only certain ones are supported.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f49bcd6145161142a76f91a38ddccbdce8039902 commit f49bcd6145161142a76f91a38ddccbdce8039902 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-11-18 03:36:58 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-11-18 03:36:58 +0000 sys-devel/autoconf-wrapper: add 20221118 Bug: https://bugs.gentoo.org/870169 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/autoconf-wrapper/Manifest | 1 + .../autoconf-wrapper-20221118.ebuild | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+)
20221118 version seems worse, and a (slightly different) warning is now printed basically all the time. To reproduce: % cat >configure.ac <<'EOF' AC_INIT([test], [0]) AC_OUTPUT EOF % autoconf [no output as expected, works only the first time] % autoconf ac-wrapper: autoconf: warning: auto-detected versions not found ( 2); falling back to latest available It appears the warning is not printed if Automake is also used. On my end, I didn't notice any problem with 20220130.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17cd20efce18f133cfb0977703bd1a5027c6a607 commit 17cd20efce18f133cfb0977703bd1a5027c6a607 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-12-07 20:47:11 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-07 20:47:19 +0000 sys-devel/autoconf-wrapper: add 20221207 Closes: https://bugs.gentoo.org/870169 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/autoconf-wrapper/Manifest | 1 + .../autoconf-wrapper-20221207.ebuild | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+)
It didn't tag the bug, so fwiw, the fix was: commit afe80def609c91d72df73837ce2c51fed8b69f28 (HEAD -> main, tag: at-20221207, origin/main, origin/HEAD) Author: Arsen Arsenović <arsen@aarsen.me> Date: Wed Dec 7 20:43:47 2022 +0000 ac-wrapper.sh: fix autoconf regex We need to optionally match the ., not require digits following period in version group. Bug: https://bugs.gentoo.org/870169 Fixes: 6f9e65b68174b938714100f34f399844f8d2cb93 Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>