Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662408 - sys-boot/grub-2.02-r2 fails to compile with gcc-8
Summary: sys-boot/grub-2.02-r2 fails to compile with gcc-8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL: http://git.savannah.gnu.org/cgit/grub...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-29 12:03 UTC by Helmut Jarausch
Modified: 2019-02-23 17:53 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log xz-compressed (grub-2.02-r2.build.xz,110.40 KB, application/x-xz)
2018-07-29 12:03 UTC, Helmut Jarausch
Details
emerge --info (xz-compressed) (emerge-info.xz,7.68 KB, application/x-xz)
2018-07-29 13:27 UTC, Helmut Jarausch
Details

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