Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
openwrt-bot opened this issue May 8, 2021 · 3 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

DazzyWalkman:

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

@openwrt-bot
Copy link
Author

tinnlux:

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

@openwrt-bot
Copy link
Author

stintel:

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

@openwrt-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant