Bug 1835638

Summary: aclocal: error: too many loops
Product: Red Hat Enterprise Linux 8 Reporter: Jaroslav Škarvada <jskarvad>
Component: autoconf-archiveAssignee: David King <dking>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: amigadave, extras-qa
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1826935 Environment:
Last Closed: 2021-04-15 10:51:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1826935    
Bug Blocks:    

Description Jaroslav Škarvada 2020-05-14 08:52:03 UTC
+++ This bug was initially created as a clone of Bug #1826935 +++

Description of problem:
PowerTOP recently (in v2.12) switched to autoconf-archive and it is not possible to build it now.

Version-Release number of selected component (if applicable):
autoconf-archive-2019.01.06-4.fc31.noarch

How reproducible:
Always

Steps to Reproduce:
1. dnf install automake libtool gettext-devel autoconf-archive
2. autoreconf -fi
3.

Actual results:
aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
aclocal: installing 'm4/ax_require_defined.m4' from '/usr/share/aclocal/ax_require_defined.m4'
aclocal: error: too many loops
aclocal: Please contact <bug-automake>.
 at /usr/share/automake-1.16/Automake/Channels.pm line 662.
	Automake::Channels::msg("automake", "", "too many loops") called at /usr/share/automake-1.16/Automake/ChannelDefs.pm line 212
	Automake::ChannelDefs::prog_error("too many loops") called at /usr/bin/aclocal line 1195
autoreconf: aclocal failed with exit status: 255

Expected results:
No too many loops error

Additional info:
Very strange that running the autoreconf twice workarounds the problem, i.e.:
autoreconf -fi || autoreconf -fi

It could be also problem in the autotools or the configure.ac.

--- Additional comment from Jaroslav Škarvada on 2020-04-22 21:49:43 CEST ---

Just dropping the
AX_ADD_FORTIFY_SOURCE
AX_PTHREAD

from the configure.ac and uninstalling the autoconf-archive, no "too many loops" error is reproduced. Then after reinstalling the autoconf-archive the error is reproduced again even without the AX_ macros.

--- Additional comment from Jaroslav Škarvada on 2020-04-22 21:55:59 CEST ---

Also reproducible in the rawhide.
In the rawhide:
automake-1.16.1-14.fc32.noarch
gettext-devel-0.20.2-1.fc33.x86_64
libtool-2.4.6-33.fc32.x86_64
autoconf-archive-2019.01.06-5.fc32.noarch

Comment 1 Jaroslav Škarvada 2020-05-14 08:53:50 UTC
When rebuilding PowerTOP it's causing build errors (which we workaround in the spec), but it triggers rpmdiff errors we have to waive.

Comment 3 David King 2021-04-15 10:51:07 UTC
As I explained in bug 1826935, this is not a bug in autoconf-archive per se, but in the internal limits of aclocal. It is possible to work around that limit that by using AX_REQUIRED_DEFINED. I have submitted a pull request to powertop upstream to do that: https://github.com/fenrus75/powertop/pull/82

Comment 4 David King 2021-04-15 14:32:09 UTC
The fix was merged in powertop upstream.