OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To
    Stijn Tintel
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by DazzyWalkman - 08.05.2021
Last edited by Stijn Tintel - 16.05.2021

FS#3790 - Grub2: Failed to build with GCC 10.30, glibc and binutils 2.36.1

I am trying to compile x64 builds up to commit:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b607e7df34031738b18582aaa1f4f93505d06734 with toolchain options GCC 10.30, glibc and binutils 2.36.1 selected
and ran into this bug:
a very large lzma_decompress.img file is output. (e.g. 134479600 bytes instead of 2864.) This causes grub-mkimage to fail with: “error: Decompressor is too big.”

There’s already a fix upstream
build: Fix GRUB i386-pc build with Ubuntu gcc
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce30f775008e093580f0c9499dfb2c485

However, this upstreamed patch does not work well in OpenWRT buildroot, as it brings in python dependency and will triger an error of “‘automake-1.15’ is probably too old.”

Another patch works in my case, even it’s superseded by a newer version from the summiter:
https://patchwork.ozlabs.org/project/buildroot/patch/20200527071932.2307442-1-fontaine.fabrice@gmail.com/

Build went fine before https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b1ac59ed13926807289344cb0486ac077fc55023 with previous toolchain options of GCC 10.30, glibc and binutils 2.35.1 selected


Closed by  Stijn Tintel
16.05.2021 01:03
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in master (e74d81ece2e2932a4f370d8e6d180061a6a2c22 9).a

tinnlux commented on 09.05.2021 02:47

I also have this bug and can't fix it.

Project Manager
Stijn Tintel commented on 13.05.2021 18:38

The automake error can be solved by adding this to the Makefile:

PKG_FIXUP:=autoreconf

Unfortunately that triggers a bunch of other errors:

gcc -DHAVE_CONFIG_H -I. -I../../..   -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/hostpkg/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-x86_64_musl/host/include -D_FILE_OFFSET_BITS=64  -O2 -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/host/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/hostpkg/include -I/home/stijn/Development/OpenWrt/openwrt/staging_dir/target-x86_64_musl/host/include -MT uniwidth/width.o -MD -MP -MF $depbase.Tpo -c -o uniwidth/width.o uniwidth/width.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from mbrtowc.c:21:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
In file included from printf-args.h:41,
                 from printf-args.c:29:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
In file included from printf-args.h:41,
                 from printf-parse.h:29,
                 from printf-parse.c:36:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
make[7]: *** [Makefile:1646: printf-args.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: *** [Makefile:1646: mbrtowc.o] Error 1
In file included from argp-fmtstream.c:31:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
In file included from mbswidth.c:33:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
In file included from wctype.h:57,
                 from wctype-h.c:4:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
In file included from wctype.h:73,
                 from wctype-h.c:4:
./wctype.h:561:6: error: #if with no expression
  561 | # if
      |      ^
make[7]: *** [Makefile:1646: wctype-h.o] Error 1
In file included from mbswidth.c:36:
./wctype.h:561:6: error: #if with no expression
  561 | # if
      |      ^
make[7]: *** [Makefile:1646: printf-parse.o] Error 1
make[7]: *** [Makefile:1646: mbswidth.o] Error 1
In file included from printf-args.h:41,
                 from printf-parse.h:29,
                 from vasnprintf.c:83:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
In file included from regex_internal.h:31,
                 from regex.c:68:
./wchar.h:593:6: error: #if with no expression
  593 | # if
      |      ^
make[7]: *** [Makefile:1646: argp-fmtstream.o] Error 1
In file included from regex_internal.h:32,
                 from regex.c:68:
./wctype.h:561:6: error: #if with no expression
  561 | # if
      |      ^
make[7]: *** [Makefile:1646: vasnprintf.o] Error 1
make[7]: *** [Makefile:1646: regex.o] Error 1

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing