Bug 922705 - Grub spec file does not specify that it requires 32-bit glibc-static to be linked even if building x86_64
Grub spec file does not specify that it requires 32-bit glibc-static to be li...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grub (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Václav Pavlín
Release Test Team
:
Depends On:
Blocks: 960054
  Show dependency treegraph
 
Reported: 2013-03-18 06:31 EDT by Jirka Tesar
Modified: 2013-11-21 15:47 EST (History)
6 users (show)

See Also:
Fixed In Version: grub-0.97-82.el6
Doc Type: Bug Fix
Doc Text:
Cause: Grub requires glibc-static during boot, but really uses 32bit glibc-static Consequence: Grub does not inform user that he needs glibc-static.i686, but fails with error without clear explanation. Fix: Depend directly on file /usr/lib/libc.a, which can be provided by different packages in different environments. Result: Grub now informs about missing file during build.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 15:47:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Require file /usr/lib/libc.a (462 bytes, patch)
2013-05-31 08:33 EDT, Václav Pavlín
no flags Details | Diff

  None (edit)
Description Jirka Tesar 2013-03-18 06:31:24 EDT
Description of problem:

When building 64-bit version of grub from source package it fails to link executable during configure phase, unless glibc-static.i686 is installed.

Version-Release number of selected component (if applicable):
grub-0.97-77.el6.src.rpm

How reproducible:

Build 64-bit grub package from source rpm

Steps to Reproduce:
1. Make sure that glibc-static.i686 is NOT installed
2. Download grub-0.97-77.el6.src.rpm
3. rpmbuild --rebuild grub-0.97-77.el6.src.rpm
  
Actual results:
Build fails to link 64-bit libc.a

Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
configure:3227: $? = 0
configure:3234: gcc -V >&5
gcc: '-V' option must have argument
configure:3238: $? = 1
configure:3261: checking for C compiler default output file name
configure:3283: gcc -m32 -Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -Wno-pointer-sign -static   conftest.c  >&5
/usr/bin/ld: skipping incompatible /usr/lib64/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status


Expected results:
If glibc-static.i686 is not installed, rpmbuild should end with dependency error:

error: Failed build dependencies:
	glibc-static.i686 is needed by grub-1:0.97-77.el6.x86_64


Additional info:
Comment 5 Václav Pavlín 2013-05-31 08:33:08 EDT
Created attachment 755248 [details]
Require file /usr/lib/libc.a

Requiring glibc-static.i686 is not possible, because this package is not provided when doing mock build (ie. building in brew). Files from 32bit glibc (and other packages) are provided by glibc32 package there, which, on the other hand, is not available in rhel repositories. 

The simplest and most straightforward solution is to add file /usr/lib/libc.a to BuildRequires. This file is provided by both glibc-static.i686 and glibc32 packages.
Comment 10 Pavel Holica 2013-10-09 06:30:20 EDT
Reproduced on RHEL6.4 x86_64 Client.
Verified fix on RHEL6.5-20131004.5 x86_64 Client.

buildrequires now contains /usr/lib/libc.a instead of glibc-static.
This file is provided only by glibc-static.i686 so it should be now easy to find proper package.
Comment 12 errata-xmlrpc 2013-11-21 15:47:30 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1649.html

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