Bug 232961 - sysutils/grub2 fails to build with GCC 8 nor clang (and is a six year old version)
Summary: sysutils/grub2 fails to build with GCC 8 nor clang (and is a six year old ver...
Status: Closed DUPLICATE of bug 234508
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-04 12:39 UTC by Gerald Pfeifer
Modified: 2019-08-12 00:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer freebsd_triage 2018-11-04 12:39:22 UTC
This ports fails to build with modern compilers such as GCC 8 or the
FreeBSD system compiler (clang).

Cf. http://package22.nyi.freebsd.org/data/112amd64-default-PR231590/2018-10-29_06h48m05s/logs/errors/grub2-2.00_12.log

==== snip ====
:
else \
  gcc8 -DHAVE_CONFIG_H  -I../grub-core/efiemu/runtime -DGRUB_FILE=\"efiemu/runtime/efiemu.c\" -I. -I. -I.. -I.. -I../include -I../include -DELF32 -m32 -Wall -Werror -nostdlib -O2 -c -o efiemu32.o efiemu/runtime/efiemu.c || exit 1; \
  if test ! -z ""; then  efiemu32.o || (rm -f efiemu32.o; exit 1); fi; \
fi
In file included from efiemu/runtime/efiemu.c:32:
../include/grub/efi/api.h:472:1: error: alignment 1 of 'struct grub_efi_vendor_device_path' is less than 8 [-Werror=packed-not-aligned]
 } __attribute__ ((packed));
 ^
../include/grub/efi/api.h:470:19: error: 'vendor_guid' offset 4 in 'struct grub_efi_vendor_device_path' isn't aligned to 8 [-Werror=packed-not-aligned]
   grub_efi_guid_t vendor_guid;
                   ^~~~~~~~~~~
../include/grub/efi/api.h:666:1: error: alignment 1 of 'struct grub_efi_vendor_messaging_device_path' is less than 8 [-Werror=packed-not-aligned]
 } __attribute__ ((packed));
 ^
==== snap ====

This would break if we proceed with the update of the default version of
GCC in the Ports Collection from GCC 7 to GCC 8.


Also, this GRUB 2.00 was released in 2012, and a newer version GRUB 2.02
more than 18 months ago.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-11-04 14:01:07 UTC
A commit references this bug:

Author: gerald
Date: Sun Nov  4 14:00:52 UTC 2018
New revision: 484054
URL: https://svnweb.freebsd.org/changeset/ports/484054

Log:
  Lock down to use GCC 7 since it does not build with GCC 8 nor clang.

  PR:		231590, 232961

Changes:
  head/sysutils/grub2/Makefile
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-11-04 20:47:36 UTC
A commit references this bug:

Author: gerald
Date: Sun Nov  4 20:47:14 UTC 2018
New revision: 484145
URL: https://svnweb.freebsd.org/changeset/ports/484145

Log:
  Sort various parts of this Makefile properly by pulling in ONLY_FOR_ARCHS
  earlier (and sorting its contents) as well as moving USES earlier and some
  unrelated variables later. [1]

  Also remove an obsolete conflict with Grub 0.x.

  Finally, though, mark this port for deprecation given that it's been
  without a maintainer for five-and-a-half years, not updated to Grub 2.02
  which was released one-and-a-half years ago, and fails to build with
  modern compilers such as clang and GCC 8. [2]

  PR:		232961 [2]
  Reported by:	portlint [1]

Changes:
  head/sysutils/grub2/Makefile
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2019-08-11 18:27:11 UTC
Closing this one, see 234508
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-12 00:16:52 UTC
^Triage: Can't close/resolve with Open dependents.

Instead mark as duplicate of bug 234508 (technically the latter ought to have been closed a duplicate of this (earlier) bug report)

*** This bug has been marked as a duplicate of bug 234508 ***