5

Problem

I'm having a RPM that contains mixed 64bit and 32bit binaries. One of the binaries depends on 32bit i686 packages. When I try to install the package yum gives me an error, noting that the package requires the 32bit packages. However when I just try to install the required packages myself it works flawless.

Details

In my spec file I have

Requires:       glibc.i686 libstdc++.i686 device-mapper-libs.i686 lshw

When I try to install the package on a CentOS 6.3 system I get:

# yum update gamigo-kvm-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package gamigo-kvm-tools.x86_64 0:0.0.7-4 will be updated
---> Package gamigo-kvm-tools.x86_64 0:0.0.9-4 will be an update
--> Processing Dependency: libstdc++.i686 for package: gamigo-kvm-tools-0.0.9-4.x86_64
--> Processing Dependency: glibc.i686 for package: gamigo-kvm-tools-0.0.9-4.x86_64
--> Processing Dependency: device-mapper-libs.i686 for package: gamigo-kvm-tools-0.0.9-4.x86_64
--> Finished Dependency Resolution
Error: Package: gamigo-kvm-tools-0.0.9-4.x86_64 (gamigo-CentOS-6-x86_64-liv)
           Requires: libstdc++.i686
Error: Package: gamigo-kvm-tools-0.0.9-4.x86_64 (gamigo-CentOS-6-x86_64-liv)
           Requires: device-mapper-libs.i686
Error: Package: gamigo-kvm-tools-0.0.9-4.x86_64 (gamigo-CentOS-6-x86_64-liv)
           Requires: glibc.i686
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

However when I manually install the referenced packages, I get

# yum install libstdc++.i686 device-mapper-libs.i686 glibc.i686
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Package libstdc++-4.4.6-4.el6.i686 already installed and latest version
Package device-mapper-libs-1.02.74-10.el6.i686 already installed and latest version
Package glibc-2.12-1.80.el6_3.5.i686 already installed and latest version
Nothing to do

I don't quite understand why the Error occurs and what it's trying to tell me. I see that it's only occurring for the 32bit packages as the fourth required package 'lshw' seems to be no problem. Is there a special specfile syntax to reference 32bit packages?

3
  • Contact the packager and report the two bugs. Commented Oct 16, 2012 at 13:16
  • I am the packager myself, and it's not a bug. You just reference 32bit libraries in a spec file differently than you would on the shell.
    – Lukas Loesche
    Commented Oct 16, 2012 at 14:10
  • AFAIR, RPM has never supported "several architectures" packages. I believe your .i?86 dependencies are wrong, and perhaps are the cause of your problems. Also, libraries are autodetected as dependencies.
    – vonbrand
    Commented Feb 25, 2013 at 10:57

2 Answers 2

14

I just found the answer. My Requires line should be

Requires:       glibc(x86-32) libstdc++(x86-32) device-mapper-libs(x86-32)

as described in http://www.rpm.org/wiki/PackagerDocs/ArchDependencies

3
  • This just shows how awesome serverfault is. You post a question and in 12 minutes you have a detailed and precise answer! Commented Oct 16, 2012 at 13:17
  • 2
    Especially if you find the answer yourself :-P ...had I searched 12 min. longer before asking on serverfault, I might not have posted the question at all. Than again, it might be useful for others with the same problem.
    – Lukas Loesche
    Commented Oct 16, 2012 at 14:12
  • Should note that specifying requirement arch. using round brackets only works on rpmbuild version > 4.6... Still have not found how to do it in 4.4 Commented Jan 22, 2015 at 0:01
0

Since somebody answered for answered for 4.6 -- for the 4.4 version, if you depend on a 32bit RPM a way around difficulties or lack of syntax that may work for others:

Requires:      /lib/libc.so.6

Since this file gets provided by the 32bit of glibc the installation will pull in the correct dependency.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .