Skip to contentSkip to conversation

Failing to build qemu-xen (in dev-mtp.c) with GCC9

Xen-devel Dario Faggioli 2 participants 2 messages Jul 26, 2019

lore
Share & tools
lore
#0 lore raw

Hey,

openSUSE Tumbleweed has: gcc version 9.1.1 20190703

And this fails to build QEMU, like this:

CC hw/watchdog/wdt_ib700.o
/build/tools/qemu-xen-dir/hw/usb/dev-mtp.c: In function ‘usb_mtp_write_metadata’:
/build/tools/qemu-xen-dir/hw/usb/dev-mtp.c:1715:36: error: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Werror=address-of-packed-member]

 1715 |                             dataset->filename);
      |                             ~~~~~~~^~~~~~~~~~

This seems to be fixed, for me, if I apply upstream patch 1259f27ec2 ("usb-mtp: fix alignment of access of ObjectInfo filename field").

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 1 line · Dario Faggioli

Hey,

Hi,

Quoted 3 lines

openSUSE Tumbleweed has: gcc version 9.1.1 20190703

And this fails to build QEMU, like this:

I'm sorry I have to ask, which version of QEMU or qemu-xen are speaking about? I'm pretty sure it's unstable, but it's better to ask :-).

Quoted 8 lines

CC hw/watchdog/wdt_ib700.o
/build/tools/qemu-xen-dir/hw/usb/dev-mtp.c: In function ‘usb_mtp_write_metadata’:
/build/tools/qemu-xen-dir/hw/usb/dev-mtp.c:1715:36: error: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Werror=address-of-packed-member]

 1715 |                             dataset->filename);
      |                             ~~~~~~~^~~~~~~~~~

This seems to be fixed, for me, if I apply upstream patch 1259f27ec2 ("usb-mtp: fix alignment of access of ObjectInfo filename field").

Thanks, I'll probably apply that to qemu-xen unstable.

Signature · 6 lines
Anthony PERARD

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