The root cause: configure scripts created with autoconf-2.70 will check for presence of config.guess and config.sub and if these files are not present in the source tree configure will abort with an error. See URL for the patch that implemented this check. It also explains the rationale and how to add config.guess and config.sub to the source tree. The issue with autotools.eclass: Now here comes the tricky part. autoconf-2.70 provides two ways to add config.guess and config.sub to the source tree by - calling "autoreconf --install" - calling "automake --add-missing" For people that are not familiar with our autotools.eclass' eautoreconf function, here's big news for you. It doesn't utilize autreconf script but calls a series of other autotools.eclass functions to emulate autoreconf: - eaclocal (possibly several times) - eautoconf - eautoheader - (optionally) eautomake - (optionally) elibtoolize so the "autoreconf --install" option can already be rejected at this point. All that's left is calling automake which the eautomake function does... BUT, eautomake only runs entirely if one of the following conditions are fullfilled: - the source tree contains one of {GNUmakefile,{M,m}akefile}.am files - configure.ac calls AC_INIT_AUTOMAKE Which leaves us with "broken" configure scripts for packages that - don't ship with config.guess and config.sub (when autoconf-2.70 is involved) - eautoconf function refuses to fully run for the above mentioned reasons One example that has all that combined is net-dns/nsd package. The patch in URL suggests if all the above fails, one should install config.guess and config.sub by hand. Trying to implement this into autotools.eclass would require to check for the currently used autoconf version because autoconf-2.69 and older do not even provide config.guess and config.sub files. Additionally we cannot check for presence of autoconf-2.70 with has_version because we need a reliable way to find out which autoconf version is being called at runtime. That cannot be determined by checking for presence of autoconf-2.70 package (autotools versions can be installed parallel in different slots). So I'm open for suggestions how to fix this. Patches would be awesome as well of course...
sys-devel/automake and sys-devel/libtool install config.guess and config.sub which are symbolic links pointing to regular files provided by sys-devel/gnuconfig: /usr/share/automake-1.15/config.guess -> ../gnuconfig/config.guess /usr/share/automake-1.15/config.sub -> ../gnuconfig/config.sub /usr/share/automake-1.16/config.guess -> ../gnuconfig/config.guess /usr/share/automake-1.16/config.sub -> ../gnuconfig/config.sub /usr/share/libtool/build-aux/config.guess -> /usr/share/gnuconfig/config.guess /usr/share/libtool/build-aux/config.sub -> /usr/share/gnuconfig/config.sub /usr/share/gnuconfig/config.guess /usr/share/gnuconfig/config.sub Symbolic links are created manually by ebuilds: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/automake/automake-1.15.1-r2.ebuild?id=0ae69faf0a570e57ea9a8c54308770e2c0fd3962#n98 https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/automake/automake-1.16.3-r1.ebuild?id=b68ed1d0de974f2bb97f526db4619b575b233d12#n112 https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/libtool/libtool-2.4.6-r6.ebuild?id=0dce3dc0aa1341155a31407122e079632fcd07ca#n110 sys-devel/automake and sys-devel/libtool also have RDEPEND="... sys-devel/gnuconfig ...". sys-devel/autoconf-2.70_beta4 does not have this dependency. https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/automake/automake-1.15.1-r2.ebuild?id=0ae69faf0a570e57ea9a8c54308770e2c0fd3962#n38 https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/automake/automake-1.16.3-r1.ebuild?id=b68ed1d0de974f2bb97f526db4619b575b233d12#n41 https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/libtool/libtool-2.4.6-r6.ebuild?id=0dce3dc0aa1341155a31407122e079632fcd07ca#n27 sys-devel/autoconf-2.70_beta4 installs config.guess and config.sub regular files, which are currently identical to config.guess and config.sub regular files provided by sys-devel/gnuconfig-20200621: /usr/share/autoconf-2.69e/build-aux/config.guess /usr/share/autoconf-2.69e/build-aux/config.sub Suggested solution: 1. In ebuilds of >=sys-devel/autoconf-2.70_beta, add code replacing config.guess and config.sub regular files with symbolic links pointing to regular files provided by sys-devel/gnuconfig, and add sys-devel/gnuconfig to RDEPEND. 2. In autotools.eclass, for simplicity, manually copy config.guess and config.sub to each directory with configure, regardless of version of sys-devel/autoconf. Probably optimal place is eautoconf() function: case ${EAPI:-0} in 0|1|2|3|4|5|6) cp "${EPREFIX}/usr/share/gnuconfig/config.guess" . || die cp "${EPREFIX}/usr/share/gnuconfig/config.sub" . || die ;; *) cp "${BROOT}/usr/share/gnuconfig/config.guess" . || die cp "${BROOT}/usr/share/gnuconfig/config.sub" . || die ;; esac (For packages with multiple configure files, eautoreconf() recursively runs eautoreconf() in appropriate subdirectories, and calls eautoconf().) Contrarily to sys-devel/autoconf, sys-devel/automake and sys-devel/libtool, sys-devel/gnuconfig is actually in @system set in base profile: https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/base/packages?id=7b31de882d430f1b625ee9dcb960323f71d5a757#n54 So it is maybe unnecessary to add dependency on sys-devel/gnuconfig in autotools.eclass. (Currently this dependency is not specified for pre-existent usage by eautomake() function.)
Created attachment 676372 [details, diff] Patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d047fb73043b86599bceb23060bacc725b393696 commit d047fb73043b86599bceb23060bacc725b393696 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2020-12-03 01:00:00 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2020-12-09 14:17:57 +0000 sys-devel/autoconf: Use config.guess and config.sub from sys-devel/gnuconfig. Make config.guess and config.sub symbolic links pointing to files provided by sys-devel/gnuconfig. Closes: https://bugs.gentoo.org/757996 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-devel/autoconf/autoconf-2.70_beta4.ebuild | 14 ++++++++++++-- sys-devel/autoconf/autoconf-9999.ebuild | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=509275acfc734c578754f3f57f0c710e9b98329c commit 509275acfc734c578754f3f57f0c710e9b98329c Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2020-12-03 00:00:00 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2020-12-09 14:17:56 +0000 autotools.eclass: eautoconf(): Install config.guess and config.sub. Bug: https://bugs.gentoo.org/757996 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> eclass/autotools.eclass | 12 ++++++++++++ 1 file changed, 12 insertions(+)