Bug 8991

Summary: grub2 fails to compile
Product: buildroot Reporter: Dr I J Ormshaw <ian_ormshaw>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: major CC: buildroot
Priority: P5    
Version: 2016.05   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: patch to fix compilation error
config file
config derived from qemu_x86_64_defconfig

Description Dr I J Ormshaw 2016-06-14 11:54:59 UTC
Created attachment 6461 [details]
patch to fix compilation error

grub2 fails to compile with the following error:

gettext/gettext.c:37:36: error: storage size of 'main_context' isn't known
 static struct grub_gettext_context main_context, secondary_context;

file grub2-2.00/grub-core/gettext/gettext.c

the structure grub_gettext_context is not defined until line 62 line

The attached patch contains the changes I made to fix the issue
Comment 1 Thomas Petazzoni 2016-06-14 12:13:08 UTC
Thanks for your report!

Could you provide the Buildroot version, and Buildroot configuration file that allow to produce this build failure?
Comment 2 Dr I J Ormshaw 2016-06-14 12:47:24 UTC
Created attachment 6466 [details]
config file
Comment 3 Dr I J Ormshaw 2016-06-14 12:50:40 UTC
Version as reported 2016-05
Comment 4 Dr I J Ormshaw 2016-06-15 07:09:01 UTC
Created attachment 6476 [details]
config derived from qemu_x86_64_defconfig

The following is what seems to cause the error

grub2:Platform (x86-64-efi)
(boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop terminal) builtin modules
Comment 5 Thomas Petazzoni 2016-07-25 20:10:34 UTC
Fixed in https://git.buildroot.org/buildroot/commit/?id=4770c4ef83f89fc3348fd6df636b0e4adac05d16. Thanks for reporting the bug!