Bug 613010 - Strange error message from rpmbuild
Summary: Strange error message from rpmbuild
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
Keywords: Reopened
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-09 14:16 UTC by Richard W.M. Jones
Modified: 2013-07-02 23:46 UTC (History)
5 users (show)

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

Attachments (Terms of Use)

Description Richard W.M. Jones 2010-07-09 14:16:11 UTC
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 15:30:18 UTC
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 16:24:52 UTC
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 23:52:35 UTC
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 12:10:32 UTC
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 12:44:16 UTC
Much better, thanks.

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