devos50 / qemu-ios

A QEMU emulator for legacy Apple devices
Other
951 stars 63 forks source link

Linux Mint compilation issue: FAILED: libcommon.fa.p/hw_intc_pl192.c.o #155

Open adespoton opened 5 months ago

adespoton commented 5 months ago

I'm not completely sure why this is killing the entire build chain, especially since I don't think the intc_pl192 hardware is even used for the iPod Touch virtual device. Should that just be commented out of the initial configure? It seems like WErrors are enabled and certain warnings are triggering in the code, causing a hard fail.

We get "cc1: all warnings being treated as errors" -- this suggests that WError is being set somewhere in one of the makefiles.

Meanwhile, we should probably update the code to handle all those unused variables and make the fallthrough explicit?

Full error and context below:

[1132/2580] Compiling C object libcommon.fa.p/hw_intc_pl192.c.o
FAILED: libcommon.fa.p/hw_intc_pl192.c.o 
cc -m64 -mcx16 -Ilibcommon.fa.p -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/SDL2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/local/opt/openssl@3/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /media/emulation/Expansion/Downloads/qemu-ios/linux-headers -isystem linux-headers -iquote . -iquote /media/emulation/Expansion/Downloads/qemu-ios -iquote /media/emulation/Expansion/Downloads/qemu-ios/include -iquote /media/emulation/Expansion/Downloads/qemu-ios/disas/libvixl -iquote /media/emulation/Expansion/Downloads/qemu-ios/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-shift-negative-value -Wno-psabi -fstack-protector-strong -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1 -D_REENTRANT -Wno-undef -MD -MQ libcommon.fa.p/hw_intc_pl192.c.o -MF libcommon.fa.p/hw_intc_pl192.c.o.d -o libcommon.fa.p/hw_intc_pl192.c.o -c ../hw/intc/pl192.c
../hw/intc/pl192.c: In function ‘pl192_init’:
../hw/intc/pl192.c:408:19: error: unused variable ‘sbd’ [-Werror=unused-variable]
  408 |     SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
      |                   ^~~
../hw/intc/pl192.c:407:17: error: unused variable ‘s’ [-Werror=unused-variable]
  407 |     PL192State *s = PL192(obj);
      |                 ^
../hw/intc/pl192.c:406:18: error: unused variable ‘dev’ [-Werror=unused-variable]
  406 |     DeviceState *dev = DEVICE(obj);
      |                  ^~~
../hw/intc/pl192.c: In function ‘pl192_read’:
../hw/intc/pl192.c:249:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
  249 |             fprintf(stderr, "pl192: attempt to read write-only register (offset = "
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  250 |                      TARGET_FMT_plx ")\n", offset);
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../hw/intc/pl192.c:251:9: note: here
  251 |         case PL192_VECTADDR:
      |         ^~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

I can probably hack this to a successful build for myself, but figured I should flag it so we can fix the warnings and handle the warning failures appropriately for a clean configure/make.

coltonisgod234 commented 5 months ago

same error, been trying this in WSL for like 2 hours now? and using find yeilds no results in either directory, very odd.

if you do fix it can you post your solution?

ToasterGithubUser commented 2 months ago

try " --disable-werror " in configure options