Bug 613010 - Strange error message from rpmbuild
Strange error message from rpmbuild
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2010-07-09 10:16 EDT by Richard W.M. Jones
Modified: 2013-07-02 19:46 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-07-13 08:10:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-07-09 10:16:11 EDT
Description of problem:

$ rpmbuild -ta guestfs-browser-0.0.3.tar.gz 
error: Recursion depth(17) greater than max(16)
 15<                               (empty)
 14<                             (empty)
 13<                           (empty)
 12<                         (empty)
 11<                       (empty)
 10<                     (empty)
  9<                   (empty)
  8<                 (empty)
  7<               (empty)
  6<             (empty)
  5<           (empty)
  4<         (empty)
  3<       (empty)
  2<     (empty)
  1<   (empty)
  0< Source0:        http://people.redhat.com/~rjones/guestfs-browser/files/guestfs-browser-
error: line 10: Source0:        http://people.redhat.com/~rjones/guestfs-browser/files/guestfs-browser-

Version-Release number of selected component (if applicable):

rpm-build.x86_64 0:4.8.1-3.fc14

How reproducible:


Steps to Reproduce:
1. Download http://annexia.org/tmp/guestfs-browser-0.0.3.tar.gz
2. Run rpmbuild -ta guestfs-browser-0.0.3.tar.gz
Actual results:

Strange error message.

Expected results:

Understandable error message.

Additional info:
Comment 1 Jindrich Novy 2010-07-09 11:30:18 EDT
The message is rather cryptic but makes perfect sense. Note that you have Version: %{version} at line 2 in the spec file what leads macro evaluator to infinite loop when evaluating Source0 at line 9 in spec:

Source0: http://people.redhat.com/~rjones/guestfs-browser/files/guestfs-browser-%{version}.tar.gz

Please fix your spec file.
Comment 2 Richard W.M. Jones 2010-07-09 12:24:52 EDT
I'm not an idiot.  I understand there is a problem with the
spec file, but the error message doesn't say anything useful
such as "you shouldn't use symbol %{version} recursively".
Comment 3 Jeff Johnson 2010-07-09 19:52:35 EDT
All macro processors do not have sufficient context to provide
useful errot messages in situ, largely because there are multiple
contexts associated.

But sure a better error message could/should/would help.

So would better input to the macro expansion.
Comment 4 Jindrich Novy 2010-07-13 08:10:32 EDT
Fixed upstream.

The new error message now looks like:

error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
error: line 10: Source0:        http://people.redhat.com/~rjones/guestfs-browser/files/guestfs-browser-

and the macro stack backtrace is now redirected to debug log in order to avoid user confusion.
Comment 5 Richard W.M. Jones 2010-07-13 08:44:16 EDT
Much better, thanks.

Note You need to log in before you can comment on or make changes to this bug.