Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870169 - sys-devel/autoconf-wrapper-20220130: ac-wrapper: autoconf: warning: auto-detected versions not found ( ); falling back to latest available
Summary: sys-devel/autoconf-wrapper-20220130: ac-wrapper: autoconf: warning: auto-dete...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-09-15 00:09 UTC by nvinson234
Modified: 2022-12-07 20:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ac-wrapper.path (ac-wrapper.patch,494 bytes, patch)
2022-09-15 00:18 UTC, nvinson234
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nvinson234 2022-09-15 00:09:11 UTC
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
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-15 00:11:02 UTC
What syntax errors? This is a pretty vague report, you're only giving the symtom even when you say you've found the cause...?
Comment 2 nvinson234 2022-09-15 00:18:08 UTC
Created attachment 805207 [details, diff]
ac-wrapper.path

A patch for the script that silences the reported error.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2022-09-15 06:23:20 UTC
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 "$@"
Comment 4 nvinson234 2022-09-15 07:44:40 UTC
(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.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-15 17:05:10 UTC
(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.
Comment 6 Larry the Git Cow gentoo-dev 2022-11-18 03:37:48 UTC
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(+)
Comment 7 Nick Bowler 2022-12-07 20:26:39 UTC
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.
Comment 8 Larry the Git Cow gentoo-dev 2022-12-07 20:47:25 UTC
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(+)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-07 20:48:03 UTC
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>