SoftwareGuy / stealthChamp-qemu

A modified version of QEMU with maximum stealth for those annoying VM-detecting rootkits
Other
15 stars 5 forks source link

Compiling on Arch Linux Error 2 #1

Open AdrianColaianni opened 2 years ago

AdrianColaianni commented 2 years ago

I am attempting to compile on Arch Linux. After cloning the repo, installing qemu, and configuring with no issues, I get this error while running make:

changing dir to build for make ""...
make[1]: Entering directory '/home/user/stealthChamp-qemu/build'
[1/1346] Generating qemu-version.h with a meson_exe.py custom command
fatal: No names found, cannot describe anything.
[2/1344] Compiling C object libcommon.fa.p/net_eth.c.o
FAILED: libcommon.fa.p/net_eth.c.o
cc -Ilibcommon.fa.p -I. -I.. -I../capstone/include/capstone -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/libusb-1.0 -I/usr/include/virgl -I/usr/include/pixman-1 -I/usr/include/vte-2.91 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/gtk-3.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/SDL2 -I/usr/include/cacard -I/usr/include/nss -I/usr/include/nspr -I/usr/include/slirp -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -Werror -std=gnu99 -O2 -g -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 -isystem /home/adrian/Developer/stealthChamp-qemu/linux-headers -isystem linux-headers -iquote /home/adrian/Developer/stealthChamp-qemu/tcg/i386 -iquote . -iquote /home/adrian/Developer/stealthChamp-qemu -iquote /home/adrian/Developer/stealthChamp-qemu/accel/tcg -iquote /home/adrian/Developer/stealthChamp-qemu/include -iquote /home/adrian/Developer/stealthChamp-qemu/disas/libvixl -pthread -fPIC -D_REENTRANT -Wno-undef -DSTRUCT_IOVEC_DEFINED -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR -MD -MQ libcommon.fa.p/net_eth.c.o -MF libcommon.fa.p/net_eth.c.o.d -o libcommon.fa.p/net_eth.c.o -c ../net/eth.c
../net/eth.c: In function ‘eth_parse_ipv6_hdr’:
../net/eth.c:410:15: error: array subscript ‘struct ip6_ext_hdr_routing[0]’ is partly outside array bounds of ‘struct ip6_ext_hdr[1]’ [-Werror=array-bounds]
  410 |     if ((rthdr->rtype == 2) &&
      |          ~~~~~^~~~~~~
../net/eth.c:487:24: note: while referencing ‘ext_hdr’
  487 |     struct ip6_ext_hdr ext_hdr;
      |                        ^~~~~~~
../net/eth.c:411:15: error: array subscript ‘struct ip6_ext_hdr_routing[0]’ is partly outside array bounds of ‘struct ip6_ext_hdr[1]’ [-Werror=array-bounds]
  411 |         (rthdr->len == sizeof(struct in6_address) / 8) &&
      |          ~~~~~^~~~~
../net/eth.c:487:24: note: while referencing ‘ext_hdr’
  487 |     struct ip6_ext_hdr ext_hdr;
      |                        ^~~~~~~
../net/eth.c:412:15: error: array subscript ‘struct ip6_ext_hdr_routing[0]’ is partly outside array bounds of ‘struct ip6_ext_hdr[1]’ [-Werror=array-bounds]
  412 |         (rthdr->segleft == 1)) {
      |          ~~~~~^~~~~~~~~
../net/eth.c:487:24: note: while referencing ‘ext_hdr’
  487 |     struct ip6_ext_hdr ext_hdr;
      |                        ^~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:172: run-ninja] Error 1
make[1]: Leaving directory '/home/user/stealthChamp-qemu/build'
make: *** [GNUmakefile:11: all] Error 2

Any ideas as to what went wrong? Have I forgotten to install something?

SoftwareGuy commented 2 years ago

Looks like some sort of compiler differences, I am not entirely sure. The repository is outdated since it uses a QEMU 5.x git development snapshot. I'd honestly patch the latest QEMU 6.x version and use that.