Bug 922705 - Grub spec file does not specify that it requires 32-bit glibc-static to be linked even if building x86_64
Summary: Grub spec file does not specify that it requires 32-bit glibc-static to be li...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grub
Version: 6.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Václav Pavlín
QA Contact: Release Test Team
Depends On:
Blocks: 960054
TreeView+ depends on / blocked
Reported: 2013-03-18 10:31 UTC by Jirka Tesar
Modified: 2018-12-09 16:58 UTC (History)
6 users (show)

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.
Clone Of:
Last Closed: 2013-11-21 20:47:30 UTC
Target Upstream Version:

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

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1649 0 normal SHIPPED_LIVE grub bug fix and enhancement update 2013-11-21 00:40:10 UTC

Description Jirka Tesar 2013-03-18 10:31:24 UTC
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):

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- --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 12:33:08 UTC
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 10:30:20 UTC
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 20:47:30 UTC
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.


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