Bug 641739

Summary: rpmbuild of grub on x86_64 require glibc-static.i686
Product: Red Hat Enterprise Linux 6 Reporter: Akemi Yagi <amyagi>
Component: distributionAssignee: RHEL Program Management <pm-rhel>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: ajb, anton, dag, david, gholms, herrold, jhughes, mishu, nkadel, phil, riek, segg.gill, toracat
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 641411 Environment:
Last Closed: 2010-11-28 23:20:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Akemi Yagi 2010-10-10 21:00:20 UTC
+++ This bug was initially created as a clone of Bug #641411 +++

Created attachment 452371 [details]
diff file of grub.spec

Description of problem: i do not know how to fix

Version-Release number of selected component (if applicable):
grub-0.97-64.fc13.x86_64

How reproducible: always

Steps to Reproduce:
1. rpmbuild -ba grub.spec
  
Actual results: it will fail in configure.

Comment 1 Akemi Yagi 2010-10-10 21:05:09 UTC
This is against grub-0.97-62.el6.src.rpm in RHEL 6 beta2. Problem is actually two-fold.

(1) grub.x86_64 spec needs Requires glibc-static.i386
(2) glibc-static.i386 is not available from the x86_64 repo. Note that glibc-static.x86_64 is in the optional repo.

Comment 3 Akemi Yagi 2010-10-10 21:19:39 UTC
Of course I meant BuildRequires.

Comment 4 Peter Jones 2010-10-12 17:45:32 UTC
This isn't something that's feasible to change at all in grub - we have to have a 32-bit glibc-static to build no matter what. If anything, this has to be fixed in the repo.

Comment 5 Gilles J. Seguin 2010-10-13 11:00:58 UTC
(In reply to comment #4)
> This isn't something that's feasible to change at all in grub - we have to have
> a 32-bit glibc-static to build no matter what. If anything, this has to be
> fixed in the repo.

you will have to rephrase your message
- my message is about requisting/changing grub.spec file, is this what you means by fixing the repo.
- my message is about adding something to grub.spec file, such that if for following command you have that result, obviously the build will fail.
rpm -q glibc-static.i686
package glibc-static is not installed

if "rpmbuild -bb grub.spec" command try to build the package, the spec file is missing dependency.

Now the fun is,
BuildRequires: glibc-static.i686
does not work, what i am missing ?

if i installed glibc-static.i686 the package will be build, but not before.

Comment 6 Akemi Yagi 2010-10-13 12:03:27 UTC
My observation is as follows:

System: RHEL 6beta2, x86_64
Source file is grub-0.97-62.el6.src.rpm from RHEL 6beta2
The spec file contains a line: BuildRequires: glibc-static

(1) When not using mock.

If you manually install glibc-static.i686 from the i686 beta-optional repo. grub builds fine. No modification to the spec file required.

(2) When using mock.

First, the missing glibc-static.i686 must be made available through a local repo in the mock cfg file.

Second, add this line to the spec file: BuildRequires: /usr/lib/libc.a

In summary, two actions are needed to successfully build grub on an x86_64 system. One is to add glibc-static.i686 to the *x86_64 repo*. The other is to add /usr/lib/libc.a as a BuildRequires.

Comment 7 Gilles J. Seguin 2010-10-14 17:20:00 UTC
(In reply to comment #6)
> [...]
> Second, add this line to the spec file: 

BuildRequires: /usr/lib/libc.a
 
> In summary, two actions are needed to successfully build grub on an x86_64
> system. One is to add glibc-static.i686 to the *x86_64 repo*. The other is to
> add /usr/lib/libc.a as a BuildRequires.

agree, solved also 641411
thanks for your time Akemi

Comment 8 Daniel Riek 2010-11-28 23:19:53 UTC
Unless I am missing the point here, this is not a RHEL bug: Optional includes build-requirements for RHEL that are not supported for production use. This one of the reasons for Optional.

So the appropriate solution appears to be making RHEL-Optional available for the mock build environment.

Comment 9 Akemi Yagi 2010-11-29 00:15:43 UTC
Sorry, I'm afraid you are missing one point. 

As described in comment 6, 'making RHEL-Optional available' is *not* sufficient to build grub.x86_64.  This is because glibc-static *i686* is required to build grub *x86_64* (please pay special attention to the arch).

The x86_64 optional repo includes a number of i686 files. However, glibc-static is x86_64 only, no i686. Therfore, the fix in this case is to add glibc-static.i686 to the x86_64 optional repo.

Comment 10 Anton Arapov 2011-07-21 11:43:10 UTC
hit same issue with bug 630171, glibc-static.i686 required for the compilation of the libhugetlbfs on x86_64 arch.

Comment 11 Johnny Hughes 2011-11-22 08:29:54 UTC
How is it NOTABUG that:

1) You do not have glibc-static.i686 in the x86_64 repo and it is required to build several packages.

2) You do not have a require defined for glibc-static.i686 in the grub SPEC filer for building the grub.x86_64.

Both of those ARE_TOO_A_BUG !

Comment 12 Akemi Yagi 2011-12-09 01:42:43 UTC
As of RHEL 6.2, glibc-static.i686 is available in the x86_64 optional repository.