Description of problem: grub2 cannot find dependencies and will not compile Version-Release number of selected component (if applicable): grub2-1.99-13.fc16.3.src.rpm How reproducible: always Steps to Reproduce: 1. yumdownloader --source grub2 2. sudo yum-builddep grub2-1.99-13.fc16.3.src.rpm 3. Actual results: [develop1@fc16-rcpao Downloads]$ sudo yum-builddep grub2-1.99-13.fc16.3.src.rpm Loaded plugins: langpacks, presto, refresh-packagekit Getting requirements for 1:grub2-1.99-13.fc16.3.src --> flex-2.5.35-13.fc15.i686 --> bison-2.5-1.fc16.i686 --> Already installed : binutils-2.21.53.0.1-6.fc16.i686 --> Already installed : python-2.7.3-1.fc16.i686 --> ncurses-devel-5.9-2.20110716.fc16.i686 --> xz-devel-5.1.1-1alpha.fc16.i686 --> freetype-devel-2.4.6-5.fc16.i686 --> 1:libusb-devel-0.1.3-9.fc16.i686 Error: No Package found for /usr/lib64/crt1.o Expected results: installs all dependent packages Additional info: Linux fc16-rcpao 3.3.6-3.fc16.i686 #1 SMP Wed May 16 22:39:40 UTC 2012 i686 i686 i386 GNU/Linux
Booting a different kernel makes no difference (as expected): Linux fc16-rcpao 3.3.6-3.fc16.i686.PAE #1 SMP Wed May 16 22:18:40 UTC 2012 i686 i686 i386 GNU/Linux This issue may be in direct conflict with this: https://bugzilla.redhat.com/show_bug.cgi?id=731767
The srpm will build fine if you install the dependencies manually and install glibc-devel for /usr/lib/crt1.o. This issue has been fixed incorrectly in the past. The _real_ fix is https://bitbucket.org/kiilerix/grub2/changeset/ce5689fa8f8b --- a/grub2.spec +++ b/grub2.spec @@ -48,11 +48,7 @@ BuildRequires: flex bison binutils python BuildRequires: ncurses-devel xz-devel BuildRequires: freetype-devel libusb-devel -%ifarch %{sparc} x86_64 -BuildRequires: /usr/lib64/crt1.o glibc-static -%else -BuildRequires: /usr/lib/crt1.o glibc-static -%endif +BuildRequires: glibc-devel glibc-static BuildRequires: autoconf automake autogen device-mapper-devel BuildRequires: freetype-devel gettext-devel git BuildRequires: texinfo
*** Bug 731767 has been marked as a duplicate of this bug. ***
MAds thats is not the real fix at all. onb 32 bit sparc we have to have the 64 bit glibc libraries installed as grub2 only builds as 64 bit, we run a 32 bit userland on 64 bit hardware. the correct fix is to rebuild the srpm on the target arch to ensure architecture specific BuildRequires are correctly handled. closing not a bug
Wait, if this is not a bug, how is anyone on i686 32-bit Fedora 16 supposed to compile the grub2 sources when it fails?
(In reply to comment #5) It compiles just fine on all sizes of intel archs. It is only yum-builddep that fails.
So a broken .spec file is considered "not a bug"? The way I got it to work was to change the .spec file and forcing use of the "BuildRequires: /usr/lib/crt1.o glibc-static" line.
The spec is not broken. It builds just fine in i686. Yum just uses the srpm requires to something that is very convenient and mostly works ... but fails in some cases.
the correct thing to do is rpm -ivh <src.rpm> then "rpmbuild -ba ~/rpmbuild/SPECS/grub2.spec" if you plan to build in mock do "rpmbuild -bs ~/rpmbuild/SPECS/grub2.spec" then feed the resulting srpm to mock. packages can have architecture specific BuildRequires those BuildRequires are embeded as SRPM creation time, so you should always make sure that when you are building a srpm you rebuild it on the target architecture to ensure that the BuildRequires are correct. this is what koji the fedora build system does. this is not a bug in any way shape or form. its a matter of doing the right thing to ensure that the BuildRequires are correct. most of the time tehre is not arch specific BuildRequires but there can be and its entirely permissable. the spec is not broken at all. if you use the unmodified spec file and rebuild it on the target arch it will build just fine.