Skip to contentSkip to conversation

More QEMU gcc-9.1 build issues

Xen-devel Dario Faggioli 2 participants 2 messages Aug 9, 2019 – Aug 16, 2019

lore
Share & tools
lore
#0 lore raw

Hey Anthony,

There's more of those issues related to building our QEMU with recent (the one in openSUSE Tumbleweed) GCC:

gcc version 9.1.1 20190723 [gcc-9-branch revision 273734] (SUSE Linux)

I've just tried building staging, and run into this:

CC hw/display/qxl-render.o
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c: In function ‘init_qxl_ram’:
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c:50:19: error: taking address of packed member of ‘struct QXLReleaseRing_ring_el’ may result in an unaligned pointer value [-Werror=address-of-packed-member]

   50 |             ret = &(r)->items[prod].el;                                 \
      |                   ^~~~~~~~~~~~~~~~~~~~
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c:429:5: note: in expansion of macro ‘SPICE_RING_PROD_ITEM’
  429 |     SPICE_RING_PROD_ITEM(d, &d->ram->release_ring, item);
      |     ^~~~~~~~~~~~~~~~~~~~
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c: In function ‘qxl_push_free_res’:
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c:50:19: error: taking address of packed member of ‘struct QXLReleaseRing_ring_el’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
   50 |             ret = &(r)->items[prod].el;                                 \
      |                   ^~~~~~~~~~~~~~~~~~~~
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c:762:5: note: in expansion of macro ‘SPICE_RING_PROD_ITEM’
  762 |     SPICE_RING_PROD_ITEM(d, ring, item);
      |     ^~~~~~~~~~~~~~~~~~~~
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c: In function ‘interface_release_resource’:
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c:50:19: error: taking address of packed member of ‘struct QXLReleaseRing_ring_el’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
   50 |             ret = &(r)->items[prod].el;                                 \
      |                   ^~~~~~~~~~~~~~~~~~~~
/home/dario/src/xen.git/tools/qemu-xen-dir/hw/display/qxl.c:795:5: note: in expansion of macro ‘SPICE_RING_PROD_ITEM’
  795 |     SPICE_RING_PROD_ITEM(qxl, ring, item);
      |     ^~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
make: *** [/home/dario/src/xen.git/tools/qemu-xen-dir/rules.mak:69: hw/display/qxl.o] Error 1

I fixed it by manually importing the following upstream commit:

94932c95c10 "qxl: avoid unaligned pointer reads/writes"

Regards

Signature · 6 lines
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw
Quoted 6 lines · Dario Faggioli

Hey Anthony,

There's more of those issues related to building our QEMU with recent (the one in openSUSE Tumbleweed) GCC:

gcc version 9.1.1 20190723 [gcc-9-branch revision 273734] (SUSE Linux)

[...]

Quoted 3 lines

I fixed it by manually importing the following upstream commit:

94932c95c10 "qxl: avoid unaligned pointer reads/writes"

Done. And I've merged every single commit available upstream! I hope that's enough :-D.

Joke aside, QEMU v4.1 was released today, so I merged it. I was waiting for that instead of cherry-picking the single commit you've pointed.

Cheers,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel