Closed jumpy4 closed 1 year ago
That happens because you're compiling for 32-bit host (I assume either you use 32-bit Debian version or have CFLAGS=-m32
). Even though there's nothing wrong with that, I guess we rarely target 32-bit platforms ourselves. But we'll get it fixed with use of right types where appropriate. Unfortunately adding --disable-werror
to QEMU's ./configure
string doesn't help in that case (see below) so the only immediate work-around for now is to target 64-bit host, is that doable for you?
If not, how gating is that QEMU building for 32-bit host for you?
cc -m32 -Ilibqemu-arc-softmmu.fa.p -I. -I.. -Itarget/arc -I../target/arc -I../capstone/include/capstone -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -isystem .../qemu/linux-headers -isystem linux-headers -iquote . -iquote .../qemu -iquote .../qemu/include -iquote .../qemu/disas/libvixl -iquote .../qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -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 -m32 -fPIE -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="arc-softmmu-config-target.h"' '-DCONFIG_DEVICES="arc-softmmu-config-devices.h"' -MD -MQ libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o -MF libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o.d -o libqemu-arc-softmmu.fa.p/target_arc_arconnect.c.o -c ../target/arc/arconnect.c
In file included from .../qemu/include/qemu/osdep.h:37,
from ../target/arc/arconnect.c:20:
../target/arc/arconnect.c: In function ‘arcon_status_read’:
.../qemu/include/qemu/compiler.h:76:36: error: static assertion failed: "not expecting: sizeof(*&(get_cpu_for_core(core_id)->env.arconnect.intrpt_status)) > ATOMIC_REG_SIZE"
76 | #define QEMU_BUILD_BUG_MSG(x, msg) _Static_assert(!(x), msg)
| ^~~~~~~~~~~~~~
.../qemu/include/qemu/compiler.h:78:30: note: in expansion of macro ‘QEMU_BUILD_BUG_MSG’
78 | #define QEMU_BUILD_BUG_ON(x) QEMU_BUILD_BUG_MSG(x, "not expecting: " #x)
| ^~~~~~~~~~~~~~~~~~
.../qemu/include/qemu/atomic.h:134:5: note: in expansion of macro ‘QEMU_BUILD_BUG_ON’
134 | QEMU_BUILD_BUG_ON(sizeof(*ptr) > ATOMIC_REG_SIZE); \
| ^~~~~~~~~~~~~~~~~
../target/arc/arconnect.c:143:20: note: in expansion of macro ‘qatomic_read’
143 | uint64_t ret = qatomic_read(&(get_cpu_for_core(core_id)->env.arconnect.intrpt_status));
| ^~~~~~~~~~~~
...
ninja: build stopped: subcommand failed.
Thanks. I tried doing it not in any special environment, and everything worked perfectly.
Hi.
I'm trying to compile the program on Debian Sid (chroot environment), and I'm running into an error. Any help would be appreciated. This is the terminal output: