rubygem build: macro expansion error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rubygem build: macro expansion error

Hans-Peter Jansen-2
Hi,

I suffer from macro expansion errors in rubygem builds:

[   29s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' --define 'disturl obs://build.opensuse.org/home:frispete:GitLab/openSUSE_13.2/cd8f1e1e66ffd44acf12bb1d37856772-rubygem-addressable' /home/abuild/rpmbuild/SOURCES/rubygem-addressable.spec
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
[   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.

resulting in build errors later on similar to:

[   31s] error: Failed build dependencies:
[   31s] rubygem(ruby:2.1.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
[   31s] rubygem(ruby:2.2.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
[   31s] rubygem(ruby:2.3.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
[   31s] rubygem(ruby:2.4.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
[   31s] rubygem(ruby:2.5.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64

https://build.opensuse.org/package/live_build_log/home:frispete:GitLab/rubygem-addressable/openSUSE_13.2/x86_64

The ruby packages in question are built here:

https://build.opensuse.org/project/monitor/home:frispete:ruby

I slightly modified the macros of devel:languages:ruby for the later
versions running on top of openSUSE_13.2. (yes, lame, I know..)

Any idea, how to debug such macro expansion errors? Is there a way to
examine the expanded spec?

I can workaround these problems by pre-installing the offending ruby
packages, but that's just papering over the underlying problem, that
I would like to understand.

Thanks in advance,
Pete
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: rubygem build: macro expansion error

Josef Reidinger-3
On Fri, 10 Nov 2017 22:04:25 +0100
Hans-Peter Jansen <[hidden email]> wrote:

> Hi,
>
> I suffer from macro expansion errors in rubygem builds:
>
> [   29s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' --define 'disturl obs://build.opensuse.org/home:frispete:GitLab/openSUSE_13.2/cd8f1e1e66ffd44acf12bb1d37856772-rubygem-addressable' /home/abuild/rpmbuild/SOURCES/rubygem-addressable.spec
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
> [   29s] error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
>
> resulting in build errors later on similar to:
>
> [   31s] error: Failed build dependencies:
> [   31s] rubygem(ruby:2.1.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
> [   31s] rubygem(ruby:2.2.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
> [   31s] rubygem(ruby:2.3.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
> [   31s] rubygem(ruby:2.4.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
> [   31s] rubygem(ruby:2.5.0: is needed by rubygem-addressable-2.5.2-2.1.x86_64
>
> https://build.opensuse.org/package/live_build_log/home:frispete:GitLab/rubygem-addressable/openSUSE_13.2/x86_64
>
> The ruby packages in question are built here:
>
> https://build.opensuse.org/project/monitor/home:frispete:ruby
>
> I slightly modified the macros of devel:languages:ruby for the later
> versions running on top of openSUSE_13.2. (yes, lame, I know..)
>
> Any idea, how to debug such macro expansion errors? Is there a way to
> examine the expanded spec?

You can try to find problematic macro by examining macros used in spec.

just get into osc build root with `osc chroot` and there you can see how macro is expanded:

 rpm -E "%gem_install"

/usr/lib/rpm/gem_install.sh              --default-gem %{mod_name}-%{version}.gem --gem-name=%{mod_name} --gem-version=%{version} --build-root /home/jreidinger/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}.x86_64

so check how it is expanded.
You can also use rpm to do just one step, so you can easier find in which section is problematic macro.

Josef

>
> I can workaround these problems by pre-installing the offending ruby
> packages, but that's just papering over the underlying problem, that
> I would like to understand.
>
> Thanks in advance,
> Pete

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]