Fails to build using GCC9
Closed this issue · 5 comments
This was reported in Debian.
Package: src:efivar
Version: 37-2
Severity: normal
Tags: sid bullseye
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-9
The package fails to build in a test rebuild on at least amd64 with
gcc-9/g++-9, but succeeds to build with gcc-8/g++-8.
The full build log can be found at:
http://people.debian.org/~doko/logs/gcc9-20190321/efivar_37-2_unstable_gcc9.log
The last lines of the build log are at the end of this report.
[...]
Check disk space
----------------
Sufficient free space for build
User Environment
----------------
APT_CONFIG=/var/lib/sbuild/apt.conf
HOME=/sbuild-nonexistent
LANG=en_US.UTF-8
LC_ALL=POSIX
LOGNAME=user42
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SCHROOT_ALIAS_NAME=unstable
SCHROOT_CHROOT_NAME=sid-amd64-sbuild
SCHROOT_COMMAND=env
SCHROOT_GID=1001
SCHROOT_GROUP=user42
SCHROOT_SESSION_ID=sid-amd64-sbuild-5140e265-439a-4f86-8475-7ce1ea65e9fa
SCHROOT_UID=1001
SCHROOT_USER=user42
SHELL=/bin/sh
USER=user42
dpkg-buildpackage
-----------------
dpkg-buildpackage: info: source package efivar
dpkg-buildpackage: info: source version 37-2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Steve McIntyre <93sam@debian.org>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
fakeroot debian/rules clean
dh clean
dh_testdir
dh_auto_clean
make -j1 clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
/bin/sh: 1: [[: not found
make[2]: Entering directory '/<<PKGBUILDDIR>>/src'
cc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -flto -I/<<PKGBUILDDIR>>/src/include/ -specs=/<<PKGBUILDDIR>>/gcc.specs -L. -Wl,-z,relro -Wl,-z,muldefs -Wdate-time -D_FORTIFY_SOURCE=2 -DEFIVAR_BUILD_ENVIRONMENT -o makeguids makeguids.c guid.c -ldl
In file included from efivar.h:30,
from makeguids.c:30:
dp.h: In function 'format_vendor_helper':
dp.h:118:37: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
118 | format_guid(buf, size, off, label, &dp->hw_vendor.vendor_guid);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
dp.h:74:25: note: in definition of macro 'format_guid'
74 | _rc = efi_guid_to_str(guid, &_guidstr); \
| ^~~~
cc1: all warnings being treated as errors
In file included from efivar.h:30,
from guid.c:27:
dp.h: In function 'format_vendor_helper':
dp.h:118:37: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=address-of-packed-member]
118 | format_guid(buf, size, off, label, &dp->hw_vendor.vendor_guid);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
dp.h:74:25: note: in definition of macro 'format_guid'
74 | _rc = efi_guid_to_str(guid, &_guidstr); \
| ^~~~
cc1: all warnings being treated as errors
make[2]: *** [/<<PKGBUILDDIR>>/Make.rules:13: makeguids] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[1]: *** [Makefile:49: clean] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_clean: make -j1 clean returned exit code 2
make: *** [debian/rules:12: clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
You need two patches already committed into the master:
https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca.patch
https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch
I am a noob when it comes to applying patches to cloned GitHub repos. How would I apply the patches listed above without having to individually edit each file mentioned? I have used .patch
files in the past, but I have yet to create one.
You need two patches already committed into the master:
https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca.patch
https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch
We have those two patches in Alpline but apparently they introduce a regression. https://bugs.archlinux.org/task/64551
https://gitlab.alpinelinux.org/alpine/aports/-/issues/11523
https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1844320
You need two patches already committed into the master:
https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca.patch
https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0.patchWe have those two patches in Alpline but apparently they introduce a regression. https://bugs.archlinux.org/task/64551
https://gitlab.alpinelinux.org/alpine/aports/-/issues/11523
https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1844320
Those are also needed:
fdb8034 (needed to be able to apply the second)
4e04afc
Closing since it sounds like this is resolved.