Using "yum-builddep" misses packages that are in the RPMs ifdef conditionals

Solution Verified - Updated -

Issue

  • By default, yum-builddep misses packages that are in conditionals. The yum-builddep command is documented to "install missing dependencies for building an RPM package", and it even goes so far to use the "kernel" package in its examples. However, yum-builddep misses packages in BuildRequires: lines that are in conditionals. For example, using the example command causes the subsequent rpmbuild -bb kernel.spec to fail due to the following missed dependencies.
     error: Failed build dependencies:
             pesign >= 0.109-4 is needed by kernel-3.10.0-123.1.2.el7.x86_64
             elfutils-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             zlib-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             binutils-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             newt-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             python-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             perl(ExtUtils::Embed) is needed by kernel-3.10.0-123.1.2.el7.x86_64
             bison is needed by kernel-3.10.0-123.1.2.el7.x86_64
             audit-libs-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             numactl-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             pciutils-devel is needed by kernel-3.10.0-123.1.2.el7.x86_64
             gettext is needed by kernel-3.10.0-123.1.2.el7.x86_64

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.