Red Hat Bugzilla – Bug 1274839
Missing buildrequire libpsm2-devel
Last modified: 2017-03-22 12:50:51 EDT
Description of problem:
yum-buildep fails to install all build requires.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. yum-builddep openmpi-1.10.0-10.el7.src.rpm
Loaded plugins: product-id
Enabling rhel-source repository
Enabling rhel-opt-source repository
Getting requirements for openmpi-1.10.0-10.el7.src
--> Already installed : gcc-gfortran-4.8.5-4.el7.x86_64
--> Already installed : 1:valgrind-devel-3.10.0-16.el7.x86_64
--> Already installed : libibverbs-devel-1.1.8-8.el7.x86_64
--> Already installed : opensm-devel-3.3.19-1.el7.x86_64
--> Already installed : librdmacm-devel-1.0.21-1.el7.x86_64
--> Already installed : hwloc-devel-1.7-5.el7.x86_64
--> Already installed : python-2.7.5-34.el7.x86_64
--> Already installed : libtool-ltdl-devel-2.4.2-20.el7.x86_64
--> Already installed : libesmtp-devel-1.0.6-7.el7.x86_64
--> Already installed : libfabric-devel-1.1.0-2.el7.x86_64
No uninstalled build requires
2. su test -c 'rpmbuild --rebuild openmpi-1.10.0-10.el7.src.rpm*''
warning: user mockbuild does not exist - using root
error: Failed build dependencies:
libpsm2-devel is needed by openmpi-1.10.0-10.el7.x86_64
all build requires are installed and package is successfully rebuilded.
Not sure if a spec issue or yum-buildep bug...
The libpsm2 source package surely generates the libpsm2-devel binary package. Need to check if it appears in the expected repositories...
libpsm2-devel is in the optional channel, but that was not the issue.
The problem is due to a known limitation in how a src.rpm can express BuildRequires that are arch-specific. openmpi.spec has:
BuildRequires: infinipath-psm-devel libpsm2-devel
If Koji/Brew chooses to create the src.rpm on an x86_64 host, the resulting src.rpm will have libpsm2-devel listed among its Requires. Otherwise it will not.
# rpm -qip openmpi-1.10.3-3.el7.src.rpm | grep Arch
This src.srpm was created on a ppc machine. And indeed there is no mention of libpsm2-devel in its Requires:
# rpm -qRp openmpi-1.10.3-3.el7.src.rpm | grep psm
If however I first install the src.rpm, and recreate it from the spec file on my local x86_64 host, it will have the Requires recorded:
# rpm -i openmpi-1.10.3-3.el7.src.rpm
# cd ~/rpmbuild/SPECS
# rpmbuild -bs openmpi.spec
# rpm -qRp ../SRPMS/openmpi-1.10.3-3.el7.src.rpm | grep psm
For an older discussion about this topic with RPM developers, see bug 948709.