I'm using grub-mkimage from a Buildroot SDK built with "make sdk" to create a boot loader image that is later combined with a home partition image (using genimage). After updating (from 2018.02.12) to 2020.02.2, when running grub-mkimage --config="$grub_early.cfg" --directory="$GRUB_DIR" -o "$OUTPUT_PATH"/grub_core.img --format=i386-pc --prefix==/boot/grub ${GRUB_MODULES} I'm now seeing this: grub-mkimage: error: Decompressor is too big. I'm building on Ubuntu 19.10 with GCC 9.2.1. The problem itself seems to be known with the Grub developers: https://lists.gnu.org/archive/html/grub-devel/2020-03/msg00217.html Is it possible to integrate the fix mentioned there for 2020.02.3?
Hi, Thanks for the bug report, does the following patch fix your issue: https://patchwork.ozlabs.org/project/buildroot/patch/20200525180029.2140650-1-fontaine.fabrice@gmail.com/ ? Best Regards, Fabrice
Hi, thanks for the patch! Unfortunately, the build of host-grub2 of the patched Buildroot fails with an automake version mismatch: mv Makefile.util.am.new Makefile.util.am cd . && /bin/bash /home/vagrant/src/myproject/build/buildroot-src/buildroot-2020.02.2/output/build/host-grub2-2.04/build-aux/missing automake-1.15 --gnu Makefile configure.ac:48: error: version mismatch. This is Automake 1.15.1, configure.ac:48: but the definition used by this AM_INIT_AUTOMAKE configure.ac:48: comes from Automake 1.15. You should recreate configure.ac:48: aclocal.m4 with aclocal and run automake again. WARNING: 'automake-1.15' is probably too old. You should only need it if you modified 'Makefile.am' or 'configure.ac' or m4 files included by 'configure.ac'. The 'automake' program is part of the GNU Automake package: <http://www.gnu.org/software/automake> It also requires GNU Autoconf, GNU m4 and Perl in order to run: <http://www.gnu.org/software/autoconf> <http://www.gnu.org/software/m4/> <http://www.perl.org/> make[1]: *** [Makefile:3350: Makefile.in] Error 63 Best regards, Stefan
Thanks for spotting this issue, you'll find the v2 here: https://patchwork.ozlabs.org/project/buildroot/patch/20200526182937.2246421-1-fontaine.fabrice@gmail.com/
I sent a v3 following the review of Yann: https://patchwork.ozlabs.org/project/buildroot/patch/20200527071932.2307442-1-fontaine.fabrice@gmail.com/
v3 works fine for me, thank you very much!
Stefan, All, Could you please provide a minimalistic defconfig that reproduces the issue, please? I have Ubutun 19.10, but I could not reproduce your issue... Regards, Yann E. MORIN.
Hi Yann, which part is it that you cannot reproduce on your system - the build failure related to automake, or the original issue, i.e. the error thrown by grub-mkimage? The original issue seems to depend on the environment's compiler used, not the one selected in Buildroot. According to https://lists.gnu.org/archive/html/grub-devel/2020-03/msg00217.html, it only occurs at least with GCC 8.3.0 and GCC 9.2.1 (which I am using), but not with GCC 7.5.0. Which GCC are you using? Best regards, Stefan
Stefan, > which part is it that you cannot reproduce on your system - the build failure related to automake, or the original issue, i.e. the error thrown by grub-mkimage? Obviously it is your original issue I am speaking about, and that I can't reproduce. > The original issue seems to depend on the environment's compiler used, not the one selected in Buildroot. According to https://lists.gnu.org/archive/html/grub-devel/2020-03/msg00217.html, it only occurs at least with GCC 8.3.0 and GCC 9.2.1 (which I am using), but not with GCC 7.5.0. As I said, I am also on Ubuntu 19.10, so using gcc 9.2.1.
Created attachment 8481 [details] Small Buildroot defconfig
(In reply to Yann E. MORIN from comment #8) I have attached a small defconfig that I can reproduce the problem with. Without the patch, output/host/lib/grub/i386-pc/lzma_decompress.img has a size of 134479600 bytes, which is what causes the actual error with grub-mkimage; with the patch, the file's size is only 2864 bytes. The exact compiler version used by me is: c++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008. Best regards, Stefan p.s.: Please note that neither was it obvious which issue you were referring to, nor does mentioning the Ubuntu version clearly indicate which GCC version you're using. While the default compiler on Ubuntu 19.10 seems to be GCC 9, there are two more GCC versions in the package repository for you to choose from, of which one the problem does not seem to occur with (according to the report I linked to).
Hello, Thanks for the report. This is supposedly fixed now with commit 7e64a050fb. Please give it a spin, and reopen if the issue is still present. Regards, Yann E. MORIN.