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

Bug 685694

Summary: app-emulation/xen-tools-4.12.0-r1 USE=ipxe fails to build with gcc-9: include/.../uri.h:178:12: error: taking address of packed member of struct uri may result in an unaligned pointer value [-Werror=address-of-packed-member]
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Xen Devs <xen>
Status: RESOLVED FIXED    
Severity: normal CC: hydrapolic, rose, spargeltarzan
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/12045
https://bugs.gentoo.org/show_bug.cgi?id=690974
https://bugs.gentoo.org/show_bug.cgi?id=685044
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
app-emulation:xen-tools-4.12.0-r1:20190511-214455.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2

Description Toralf Förster gentoo-dev 2019-05-12 09:22:11 UTC
                 from core/open.c:29:
include/ipxe/uri.h: In function ‘uri_get’:
include/ipxe/uri.h:178:12: error: taking address of packed member of ‘struct uri’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
  178 |  ref_get ( &uri->refcnt );
      |            ^~~~~~~~~~~~
include/ipxe/refcnt.h:95:18: note: in definition of macro ‘ref_get’

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_libressl_20190510-220703

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.1.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems) *




emerge -qpvO app-emulation/xen-tools
[ebuild  N    ] app-emulation/xen-tools-4.12.0-r1  USE="hvm ipxe pam qemu qemu-traditional rombios -api -custom-cflags -debug -doc -flask -ocaml -ovmf -pygrub -python -screen -sdl -static-libs -system-ipxe -system-qemu -system-seabios" PYTHON_TARGETS="python2_7"
Comment 1 Toralf Förster gentoo-dev 2019-05-12 09:22:14 UTC
Created attachment 576102 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-05-12 09:22:17 UTC
Created attachment 576104 [details]
app-emulation:xen-tools-4.12.0-r1:20190511-214455.log
Comment 3 Toralf Förster gentoo-dev 2019-05-12 09:22:19 UTC
Created attachment 576106 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-05-12 09:22:22 UTC
Created attachment 576108 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-05-12 09:22:25 UTC
Created attachment 576110 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-05-12 09:22:28 UTC
Created attachment 576112 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2019-05-12 09:22:31 UTC
Created attachment 576114 [details]
temp.tbz2
Comment 8 Tomáš Mózes 2019-05-14 18:52:54 UTC
A workaround is to build without IPXE:
USE="-ipxe" emerge -av1 xen-tools
Comment 9 Juergen Rose 2019-05-14 20:25:13 UTC
'USE=-ipxe emerge -v1 xen-tools' worked for me as well.
Comment 10 Tomáš Mózes 2019-05-15 20:34:11 UTC
Oh, I forgot, system-ipxe should work too:
USE="-ipxe system-ipxe" emerge -av1 xen-tools
Comment 11 Juergen Rose 2019-05-17 14:47:28 UTC
'xen-tools-4.12.0-r2' fails with the same error.
Comment 12 Tomáš Mózes 2019-05-17 15:48:41 UTC
(In reply to Juergen Rose from comment #11)
> 'xen-tools-4.12.0-r2' fails with the same error.

It only contains the security patches, I haven'd find the gcc9 fixes for ipxe.
Comment 13 Tomáš Mózes 2019-05-17 18:56:58 UTC
(In reply to Tomáš Mózes from comment #12)
> (In reply to Juergen Rose from comment #11)
> > 'xen-tools-4.12.0-r2' fails with the same error.
> 
> It only contains the security patches, I haven'd find the gcc9 fixes for
> ipxe.

.. haven't found ...
Comment 14 Tomáš Mózes 2019-05-18 09:45:21 UTC
*** Bug 686172 has been marked as a duplicate of this bug. ***
Comment 16 Larry the Git Cow gentoo-dev 2019-05-22 02:35:06 UTC
The bug has been closed via the following commit(s):

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

commit 50508c2fed59ef3bf0301387276146f936197ca3
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: 2019-05-18 20:14:12 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2019-05-22 02:14:35 +0000

    app-emulation/xen-tools: fix ipxe building with gcc9
    
    Closes: https://bugs.gentoo.org/685694
    Closes: https://github.com/gentoo/gentoo/pull/12045
    
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 app-emulation/xen-tools/Manifest                                     | 1 +
 .../{xen-tools-4.12.0-r2.ebuild => xen-tools-4.12.0-r3.ebuild}       | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)