Bug 8991 - grub2 fails to compile
Summary: grub2 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2016.05
Hardware: PC Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-14 11:54 UTC by Dr I J Ormshaw
Modified: 2016-07-25 20:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
patch to fix compilation error (746 bytes, patch)
2016-06-14 11:54 UTC, Dr I J Ormshaw
Details
config file (66.27 KB, text/plain)
2016-06-14 12:47 UTC, Dr I J Ormshaw
Details
config derived from qemu_x86_64_defconfig (66.24 KB, text/plain)
2016-06-15 07:09 UTC, Dr I J Ormshaw
Details

Note You need to log in before you can comment on or make changes to this bug.
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!