Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 662408

Summary: sys-boot/grub-2.02-r2 fails to compile with gcc-8
Product: Gentoo Linux Reporter: Helmut Jarausch <jarausch>
Component: Current packagesAssignee: Mike Gilbert <floppym>
Status: RESOLVED FIXED    
Severity: normal CC: adam, b.buschinski, herrtimson, jstein, kredba, zoltan
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=563b1da6e6ae7af46cc8354cadb5dab416989f0a
See Also: https://bugs.gentoo.org/show_bug.cgi?id=654766
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log xz-compressed
emerge --info (xz-compressed)

Description Helmut Jarausch 2018-07-29 12:03:30 UTC
Created attachment 541678 [details]
build log  xz-compressed

Trying to compile sys-boot/grub-2.02-r2 with gcc-8.2.0 fails with

/var/tmp/portage/sys-boot/grub-2.02-r2/work/grub-2.02/include/grub/efiemu/runtime.h:36:1: error: alignment 1 of 'struct efi_variable' is less than 8 [-Werror=packed-not-aligned]
Comment 1 Helmut Jarausch 2018-07-29 13:27:35 UTC
Created attachment 541692 [details]
emerge --info  (xz-compressed)
Comment 2 Helmut Jarausch 2018-07-29 16:03:15 UTC
Here is a fix

add the following sed command to src_prepare()

	sed -i -e '/} GRUB_PACKED;/s/GRUB_PACKED/__attribute__ ((aligned(8))) GRUB_PACKED/' \
          include/grub/efiemu/runtime.h
Comment 3 Helmut Jarausch 2018-09-03 14:57:19 UTC
The same patch is needed for grub-2.02-r3
Comment 4 Larry the Git Cow gentoo-dev 2018-09-06 03:38:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab479f78d08aaab25917e51f90b85e0ca5f42b4

commit bab479f78d08aaab25917e51f90b85e0ca5f42b4
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-09-06 03:38:26 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-09-06 03:38:26 +0000

    sys-boot/grub: fix build with gcc8
    
    Closes: https://bugs.gentoo.org/662408
    Package-Manager: Portage-2.3.49_p2, Repoman-2.3.10_p48

 sys-boot/grub/files/2.02-gcc8.patch | 72 +++++++++++++++++++++++++++++++++++++
 sys-boot/grub/grub-2.02-r3.ebuild   |  1 +
 2 files changed, 73 insertions(+)