ispras / swat

SWAT - System-Wide Analysis Toolkit
13 stars 9 forks source link

Compilation fails on qemu #8

Open belliash opened 1 year ago

belliash commented 1 year ago

FAILED: libqemuutil.a.p/qobject_block-qdict.c.o cc -Ilibqemuutil.a.p -I. -I../../qemu -Isubprojects/libvhost-user -I../../qemu/subprojects/libvhost-user -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /home/Belliash/1/swat/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/Belliash/1/swat/qemu -iquote /home/Belliash/1/swat/qemu/include -iquote /home/Belliash/1/swat/qemu/disas/libvixl -iquote /home/Belliash/1/swat/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libqemuutil.a.p/qobject_block-qdict.c.o -MF libqemuutil.a.p/qobject_block-qdict.c.o.d -o libqemuutil.a.p/qobject_block-qdict.c.o -c ../../qemu/qobject/block-qdict.c In file included from /home/Belliash/1/swat/qemu/include/qapi/qmp/qdict.h:16, from /home/Belliash/1/swat/qemu/include/block/qdict.h:13, from ../../qemu/qobject/block-qdict.c:11: /home/Belliash/1/swat/qemu/include/qapi/qmp/qobject.h: In function ‘qdict_array_split’: /home/Belliash/1/swat/qemu/include/qapi/qmp/qobject.h:49:17: error: ‘subqdict’ may be used uninitialized [-Werror=maybe-uninitialized] 49 | typeof(obj) _obj = (obj); \ | ^~~~ ../../qemu/qobject/block-qdict.c:227:16: note: ‘subqdict’ declared here 227 | QDict *subqdict; | ^~~~~~~~ cc1: all warnings being treated as errors ninja: build stopped: subcommand failed. make: *** [Makefile:156: run-ninja] Error 1

Dovgalyuk commented 1 year ago

Looks like incompatibility with newer compilers, that have better diagnostics.

belliash commented 1 year ago

Maybe it's time to update qemu? 7.2.0 built fine for me with GCC 12.2.1

Dovgalyuk commented 1 year ago

This is a proof-of-concept project. Now we switched to the extended version of that technology and used it in ready-to-market product.