Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 594646 - yum-builddep: multilib: missed BuildReq
yum-builddep: multilib: missed BuildReq
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils (Show other bugs)
6.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: James Antill
Jiri Kastner
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-21 04:57 EDT by Jan Kratochvil
Modified: 2014-01-21 01:18 EST (History)
3 users (show)

See Also:
Fixed In Version: yum-utils-1.1.26-9.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 17:01:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Kratochvil 2010-05-21 04:57:45 EDT
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):
http://download.devel.redhat.com/nightly/latest-RHEL6.0/6/Workstation/x86_64/os
on 2010-05-21

How reproducible:
Always.

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 11:25:00 EDT
libstdc++-devel.i686 is available in the tree. Did you try installing it?
Comment 2 Jan Kratochvil 2010-05-21 11:52:35 EDT
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)
%description
EOH
# 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++
libstdc++-4.4.4-4.el6.x86_64
# 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
Installing:
 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 15:09:28 EDT
 The code does:

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

...changing that to:

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

...fixes it here. Seth, any idea why we didn't do that to start with?
Comment 5 James Antill 2010-05-21 15:16:15 EDT
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)
                    self.install(pkg)

...works too.
Comment 6 James Antill 2010-05-21 15:28:56 EDT
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 12:33:50 EDT
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 06:10:09 EDT
verified on multilib platforms (x86_64, s390x, ppc64)
Comment 11 releng-rhel@redhat.com 2010-11-10 17:01:24 EST
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.