Using gcc-12.1.1_pre20220514: (...) [BUILD] bin/interface.o In file included from include/string.h:23, from include/ipxe/uaccess.h:25, from core/acpi.c:28: In function ‘__constant_memcpy’, inlined from ‘memcpy’ at arch/x86/include/bits/string.h:168:10, inlined from ‘trivial_memcpy_user’ at include/ipxe/uaccess.h:109:2, inlined from ‘memcpy_user’ at arch/x86/include/librm.h:155:2, inlined from ‘copy_from_user’ at include/ipxe/uaccess.h:338:2, inlined from ‘acpi_sx_zsdt’ at core/acpi.c:220:3: arch/x86/include/bits/string.h:79:32: error: array subscript ‘union <anonymous>[0]’ is partly outside array bounds of ‘union <anonymous>[1]’ [-Werror=array-bounds] 79 | dest_u->u32[0] = src_u->u32[0]; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ core/acpi.c: In function ‘acpi_sx_zsdt’: core/acpi.c:194:11: note: object ‘buf’ of size 4 194 | } buf; | ^~~ [BUILD] bin/iobuf.o [BUILD] bin/iomap_virt.o [BUILD] bin/isqrt.o [BUILD] bin/job.o [BUILD] bin/linebuf.o [BUILD] bin/lineconsole.o [BUILD] bin/list.o [BUILD] bin/log.o [BUILD] bin/main.o [BUILD] bin/malloc.o (...) Reproducible: Always
Created attachment 779282 [details] build.log.gz
Created attachment 779285 [details] emerge-info.txt
It seems Fedora is handling this by setting this warning as non-fatal: https://src.fedoraproject.org/rpms/xen/blob/rawhide/f/xen.gcc12.fixes.patch $(call cc-option-add,CFLAGS,CC,-Wno-error=array-bounds)
Should have taken a closer look because that patch does not fix the error logged. Also, seems like we're maintaining a patchset out-of-tree so I can't really help there.
ping
The errors origin in ("bundled") ipxe. I am not sure what the best course of action is. I think that the current version of sys-firmware/ipxe 1.21.1 should be also affected by this, because it appears to be even older than the Xen version (1.21.1 is from 2020-12-31, the Xen version 3c040ad, is from 2021-06-11). We could try to apply upstream commit 02ec659b73b0 ("[acpi] Generalise DSDT/SSDT data extraction logic"), that looks like it could at least fix one error.
FYI, ipxe-1.21.1[*,-binary] compiles just fine with gcc-12.2.9999 (May 30th version)
(In reply to Kobboi from comment #7) > FYI, ipxe-1.21.1[*,-binary] compiles just fine with gcc-12.2.9999 (May 30th > version) Try removing the "export NO_WERROR=1" [1] in the ebuild's src_compile() phase. Then it will fail with the same errors. 1: https://github.com/gentoo/gentoo/blob/1c040cb550fa6ab596ec2297f47113d7a4fd90a4/sys-firmware/ipxe/ipxe-1.21.1.ebuild#L78
With some luck, GCC 12 will be unleashed in ~arch around Sunday. If a bug gets fixed upstream.
(In reply to Sam James from comment #9) > With some luck, GCC 12 will be unleashed in ~arch around Sunday. If a bug > gets fixed upstream. ping
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b48c2d2662337ed28190d32ad3898686959dccd5 commit b48c2d2662337ed28190d32ad3898686959dccd5 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2022-07-04 10:22:01 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-07-05 16:20:56 +0000 app-emulation/xen-tools: add 4.16.1, 4.16.2_pre1 This introduces a new approach to handle Xen patching and versioning. SECURITY_VER and OVMF_VER where dropped as those have not been used in a while. We now consume the upstream patches from a repository called xen-upstream-patches, which will ultimately be hosted by Gentoo infra (e.g. available under gitweb.gentoo.org). The Gentoo patchset now lives in a repository called xen-gentoo-patches, which will also be hosted on Gentoo infra. Furthermore we now follow upstreams versioning scheme. Previously we would sell Xen 4.16.2-pre, which is from the staging-4.16 branch containing security fixes, as Xen 4.16.1. To avoid confusion, we will label the Xen versions as such, and Xen 4.16.1 will what is tagged upstream as RELEASE-4.16.1 (+ the few Gentoo specific patches). Closes: https://bugs.gentoo.org/845099 Bug: https://bugs.gentoo.org/850802 Closes: https://github.com/gentoo/gentoo/pull/25839 Signed-off-by: Florian Schmaus <flow@gentoo.org> app-emulation/xen-tools/Manifest | 3 + app-emulation/xen-tools/xen-tools-4.16.1.ebuild | 526 +++++++++++++++++++++ .../xen-tools/xen-tools-4.16.2_pre1.ebuild | 526 +++++++++++++++++++++ 3 files changed, 1055 insertions(+)