Hide Forgot
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:
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.
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.
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