Bug 594646 - yum-builddep: multilib: missed BuildReq
Summary: yum-builddep: multilib: missed BuildReq
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.0
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Jiri Kastner
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-21 08:57 UTC by Jan Kratochvil
Modified: 2014-01-21 06:18 UTC (History)
3 users (show)

Fixed In Version: yum-utils-1.1.26-9.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-11-10 22:01:24 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Jan Kratochvil 2010-05-21 08:57:45 UTC
Description of problem:
One cannot build any 32bit C++ program on 64bit x86_64 system.
This is a regression against RHEL-5.5.

Version-Release number of selected component (if applicable):
on 2010-05-21

How reproducible:

Steps to Reproduce:
echo 'main(){}'|g++ -m32 -x c++ -

Actual results:
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

Expected results:
Built a.out.

Additional info:
libgcj.i686 has the same problem but GCC-Java is not much relevant anymore.

Comment 1 Bill Nottingham 2010-05-21 15:25:00 UTC
libstdc++-devel.i686 is available in the tree. Did you try installing it?

Comment 2 Jan Kratochvil 2010-05-21 15:52:35 UTC
Oops, yes, distro is OK, just yum-builddep has a bug.

# cat >bireq.spec <<EOH
Summary: bireq
Name: bireq
Version: 1
Release: 0%{?dist}
License: GPL
BuildRequires: libstdc++(x86-64)
BuildRequires: libstdc++(x86-32)
# rpmbuild -bs bireq.spec
Wrote: /root/rpmbuild/SRPMS/bireq-1-0.el6.src.rpm
# yum-builddep rpmbuild/SRPMS/bireq-1-0.el6.src.rpm
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Getting requirements for bireq-1-0.el6.src
 --> Already installed : libstdc++-4.4.4-4.el6.x86_64
 --> libstdc++-4.4.4-4.el6.i686
No uninstalled build requires
# rpm -q libstdc++
# yum install 'libstdc++(x86-32)'
--> Running transaction check
---> Package libstdc++.i686 0:4.4.4-4.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
 Package                    Arch                  Version                      Repository             Size
 libstdc++                  i686                  4.4.4-4.el6                  rhel                  287 k
Transaction Summary
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 287 k
Installed size: 908 k
Is this ok [y/N]: no

Comment 4 James Antill 2010-05-21 19:09:28 UTC
 The code does:

                    pkg = self.returnPackageByDep(dep)
                    self.logger.info(' --> %s' % pkg)
                    if not self.rpmdb.installed(name=pkg.name):

...changing that to:

                    pkg = self.returnPackageByDep(dep)
                    self.logger.info(' --> %s' % pkg)
                    if not self.rpmdb.installed(name=pkg.name, arch=pkg.arch):

...fixes it here. Seth, any idea why we didn't do that to start with?

Comment 5 James Antill 2010-05-21 19:16:15 UTC
The interesting thing there is that it's already checked to see if any installed package provides what is needed. So just doing nothing means it won't do updates etc.

Doing (what I expected it would have done):

                    pkg = self.returnPackageByDep(dep)
                    self.logger.info(' --> %s' % pkg)

...works too.

Comment 6 James Antill 2010-05-21 19:28:56 UTC
I see ... the rpmdb.installed() check is from before we called, returnInstalledPackagesByDep() ... so that was the only check we had that we weren't installing something undeeded.

I'll change it to the comment #5, upstream ... I can do the change for 6.0, but I'm 99.999% sure this isn't a regression in yum-buildep ... just that we don't install all of multilib. by default now. So I bet before we either didn't have libstdc++ in the buildroot or had both arches.

Comment 7 James Antill 2010-05-25 16:33:50 UTC
I'm happy to fix this for 6.0, as I said in comment#5 it's like a two line change and pretty easy to test.

Comment 10 Jiri Kastner 2010-07-07 10:10:09 UTC
verified on multilib platforms (x86_64, s390x, ppc64)

Comment 11 releng-rhel@redhat.com 2010-11-10 22:01:24 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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