Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IPT1g] Several build errors on compiling #174

Open
syboxez opened this issue Aug 1, 2024 · 12 comments
Open

[IPT1g] Several build errors on compiling #174

syboxez opened this issue Aug 1, 2024 · 12 comments

Comments

@syboxez
Copy link

syboxez commented Aug 1, 2024

[syboxez@Slaptop build]$ make
  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc
[1/2129] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[2/2129] Compiling C object libqemuutil.a.p/util_fdmon-io_uring.c.o
FAILED: libqemuutil.a.p/util_fdmon-io_uring.c.o 
cc -m64 -mcx16 -Ilibqemuutil.a.p -I. -I.. -Isubprojects/libvhost-user -I../subprojects/libvhost-user -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/sysprof-6 -I/usr/include/gio-unix-2.0 -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -isystem /home/syboxez/gitstuff/qemu-ios/linux-headers -isystem linux-headers -iquote . -iquote /home/syboxez/gitstuff/qemu-ios -iquote /home/syboxez/gitstuff/qemu-ios/include -iquote /home/syboxez/gitstuff/qemu-ios/disas/libvixl -iquote /home/syboxez/gitstuff/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-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MQ libqemuutil.a.p/util_fdmon-io_uring.c.o -MF libqemuutil.a.p/util_fdmon-io_uring.c.o.d -o libqemuutil.a.p/util_fdmon-io_uring.c.o -c ../util/fdmon-io_uring.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
../util/fdmon-io_uring.c: In function ‘add_poll_remove_sqe’:
../util/fdmon-io_uring.c:182:36: error: passing argument 2 of ‘io_uring_prep_poll_remove’ makes integer from pointer without a cast [-Wint-conversion]
  182 |     io_uring_prep_poll_remove(sqe, node);
      |                                    ^~~~
      |                                    |
      |                                    AioHandler *
In file included from /home/syboxez/gitstuff/qemu-ios/include/block/aio.h:18,
                 from ../util/aio-posix.h:20,
                 from ../util/fdmon-io_uring.c:49:
/usr/include/liburing.h:540:52: note: expected ‘__u64’ {aka ‘long long unsigned int’} but argument is of type ‘AioHandler *’
  540 |                                              __u64 user_data)
      |                                              ~~~~~~^~~~~~~~~
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

After bypassing using #pragma GCC diagnostic ignored "-Wint-conversion" I get this:

  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc
[1/786] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[2/784] Compiling C object libcommon.fa.p/ebpf_ebpf_rss.c.o
FAILED: libcommon.fa.p/ebpf_ebpf_rss.c.o 
cc -m64 -mcx16 -Ilibcommon.fa.p -I/usr/include/pixman-1 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/opus -I/usr/include/cacard -I/usr/include/sysprof-6 -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libpng16 -I/usr/include/p11-kit-1 -I/usr/include/SDL2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/cloudproviders -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/vte-2.91 -I/usr/include/rav1e -I/usr/include/svt-av1 -I/usr/include/webp -I/usr/include/virgl -I/usr/include/libdrm -I/usr/include/libusb-1.0 -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -isystem /home/syboxez/gitstuff/qemu-ios/linux-headers -isystem linux-headers -iquote . -iquote /home/syboxez/gitstuff/qemu-ios -iquote /home/syboxez/gitstuff/qemu-ios/include -iquote /home/syboxez/gitstuff/qemu-ios/disas/libvixl -iquote /home/syboxez/gitstuff/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-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DHWY_SHARED_DEFINE -DAVIF_DLL -DEB_DLL -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1 -D_REENTRANT -Wno-undef -DSTRUCT_IOVEC_DEFINED -MD -MQ libcommon.fa.p/ebpf_ebpf_rss.c.o -MF libcommon.fa.p/ebpf_ebpf_rss.c.o.d -o libcommon.fa.p/ebpf_ebpf_rss.c.o -c ../ebpf/ebpf_rss.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
../ebpf/ebpf_rss.c: In function ‘ebpf_rss_load’:
../ebpf/ebpf_rss.c:52:5: error: implicit declaration of function ‘bpf_program__set_socket_filter’; did you mean ‘bpf_program__attach_netfilter’? [-Wimplicit-function-declaration]
   52 |     bpf_program__set_socket_filter(rss_bpf_ctx->progs.tun_rss_steering_prog);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     bpf_program__attach_netfilter
../ebpf/ebpf_rss.c:52:5: warning: nested extern declaration of ‘bpf_program__set_socket_filter’ [-Wnested-externs]
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

After bypassing that, I get:

  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc
[1/632] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[2/630] Compiling C object libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch.c.o
FAILED: libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch.c.o 
cc -m64 -mcx16 -Ilibqemu-arm-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/opus -I/usr/include/cacard -I/usr/include/sysprof-6 -I/usr/include/nss -I/usr/include/nspr -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -isystem /home/syboxez/gitstuff/qemu-ios/linux-headers -isystem linux-headers -iquote . -iquote /home/syboxez/gitstuff/qemu-ios -iquote /home/syboxez/gitstuff/qemu-ios/include -iquote /home/syboxez/gitstuff/qemu-ios/disas/libvixl -iquote /home/syboxez/gitstuff/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-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="arm-softmmu-config-target.h"' '-DCONFIG_DEVICES="arm-softmmu-config-devices.h"' -MD -MQ libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch.c.o -MF libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch.c.o.d -o libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch.c.o -c ../hw/arm/ipod_touch.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch.h:15,
                 from ../hw/arm/ipod_touch.c:13:
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h: In function ‘convert_hex_key_to_bin’:
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:33:13: warning: unused variable ‘slen’ [-Wunused-variable]
   33 |         int slen = strlen(str);
      |             ^~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h: In function ‘s5l8900_8900_engine_write’:
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:57:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
   57 |         printf("Reading 8900 header with length %d at address 0x%08x\n", sizeof(header8900), value);
      |                                                 ~^                       ~~~~~~~~~~~~~~~~~~
      |                                                  |                       |
      |                                                  int                     long unsigned int
      |                                                 %ld
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:57:68: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
   57 |         printf("Reading 8900 header with length %d at address 0x%08x\n", sizeof(header8900), value);
      |                                                                 ~~~^                         ~~~~~
      |                                                                    |                         |
      |                                                                    unsigned int              uint64_t {aka long unsigned int}
      |                                                                 %08lx
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:73:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   73 |         else if( header->encrypted = 0x04 ) { encrypted = 0; }
      |                  ^~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:78:57: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
   78 |         printf("Will decrypt 8900 image at address 0x%08x (len: %d bytes)\n", value, data_len);
      |                                                      ~~~^                     ~~~~~
      |                                                         |                     |
      |                                                         unsigned int          uint64_t {aka long unsigned int}
      |                                                      %08lx
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:78:66: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘off_t’ {aka ‘long int’} [-Wformat=]
   78 |         printf("Will decrypt 8900 image at address 0x%08x (len: %d bytes)\n", value, data_len);
      |                                                                 ~^                   ~~~~~~~~
      |                                                                  |                   |
      |                                                                  int                 off_t {aka long int}
      |                                                                 %ld
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:86:32: warning: pointer targets in passing argument 1 of ‘convert_hex_key_to_bin’ differ in signedness [-Wpointer-sign]
   86 |         convert_hex_key_to_bin(ramdiskKey, aes_key, 16);
      |                                ^~~~~~~~~~
      |                                |
      |                                unsigned char *
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:31:42: note: expected ‘char *’ but argument is of type ‘unsigned char *’
   31 | static void convert_hex_key_to_bin(char *str, uint8_t *bytes, int maxlen)
      |                                    ~~~~~~^~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:87:9: warning: ‘AES_set_decrypt_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   87 |         AES_set_decrypt_key(aes_key, 128, &aes_decrypt_key);
      |         ^~~~~~~~~~~~~~~~~~~
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_aes.h:10,
                 from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch.h:13:
/usr/include/openssl/aes.h:54:5: note: declared here
   54 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
      |     ^~~~~~~~~~~~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:93:17: warning: ‘AES_cbc_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   93 |                 AES_cbc_encrypt(inbuf + data_current, intbuf, AES_BLOCK_SIZE, &aes_decrypt_key, iv, 0);
      |                 ^~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:66:6: note: declared here
   66 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:53:41: warning: unused variable ‘data_end’ [-Wunused-variable]
   53 |         off_t data_begin, data_current, data_end, data_len;
      |                                         ^~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:53:15: warning: variable ‘data_begin’ set but not used [-Wunused-but-set-variable]
   53 |         off_t data_begin, data_current, data_end, data_len;
      |               ^~~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:52:13: warning: variable ‘encrypted’ set but not used [-Wunused-but-set-variable]
   52 |         int encrypted;
      |             ^~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:50:23: warning: unused variable ‘keybuf’ [-Wunused-variable]
   50 |         unsigned char keybuf[16];
      |                       ^~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:48:23: warning: unused variable ‘ramdiskiv’ [-Wunused-variable]
   48 |         unsigned char ramdiskiv[1];
      |                       ^~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:44:17: warning: unused variable ‘ctx’ [-Wunused-variable]
   44 |         AES_KEY ctx, aes_decrypt_key;
      |                 ^~~
../hw/arm/ipod_touch.c: In function ‘s5l8900_usb_phys_read’:
../hw/arm/ipod_touch.c:105:57: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘hwaddr’ {aka ‘long unsigned int’} [-Wformat=]
  105 |         fprintf(stderr, "%s: read invalid location 0x%08x\n", __func__, addr);
      |                                                      ~~~^               ~~~~
      |                                                         |               |
      |                                                         unsigned int    hwaddr {aka long unsigned int}
      |                                                      %08lx
../hw/arm/ipod_touch.c: In function ‘s5l8900_usb_phys_write’:
../hw/arm/ipod_touch.c:136:58: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘hwaddr’ {aka ‘long unsigned int’} [-Wformat=]
  136 |         fprintf(stderr, "%s: write invalid location 0x%08x\n", __func__, addr);
      |                                                       ~~~^               ~~~~
      |                                                          |               |
      |                                                          unsigned int    hwaddr {aka long unsigned int}
      |                                                       %08lx
../hw/arm/ipod_touch.c: In function ‘ipod_touch_machine_init’:
../hw/arm/ipod_touch.c:360:42: warning: passing argument 1 of ‘pl192_manual_init’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  360 |     DeviceState *dev = pl192_manual_init("vic0", qdev_get_gpio_in(DEVICE(nms->cpu), ARM_CPU_IRQ), qdev_get_gpio_in(DEVICE(nms->cpu), ARM_CPU_FIQ), NULL);
      |                                          ^~~~~~
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch.h:9:
/home/syboxez/gitstuff/qemu-ios/include/hw/intc/pl192.h:78:38: note: expected ‘char *’ but argument is of type ‘const char *’
   78 | DeviceState *pl192_manual_init(char *mem_name, ...);
      |                                ~~~~~~^~~~~~~~
../hw/arm/ipod_touch.c:367:29: warning: passing argument 1 of ‘pl192_manual_init’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  367 |     dev = pl192_manual_init("vic1", NULL);
      |                             ^~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/intc/pl192.h:78:38: note: expected ‘char *’ but argument is of type ‘const char *’
   78 | DeviceState *pl192_manual_init(char *mem_name, ...);
      |                                ~~~~~~^~~~~~~~
../hw/arm/ipod_touch.c:505:27: error: assignment to ‘char *’ from incompatible pointer type ‘char (*)[1024]’ [-Wincompatible-pointer-types]
  505 |     nand_state->nand_path = &nms->nand_path;
      |                           ^
../hw/arm/ipod_touch.c:600:15: warning: unused variable ‘pmu’ [-Wunused-variable]
  600 |     I2CSlave *pmu = i2c_slave_create_simple(i2c_state->bus, "pcf50633", 0x73);
      |               ^~~
../hw/arm/ipod_touch.c:590:15: warning: unused variable ‘accelerometer’ [-Wunused-variable]
  590 |     I2CSlave *accelerometer = i2c_slave_create_simple(i2c_state->bus, "lis302dl", 0x1D);
      |               ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

After bypassing that, I get:

  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc
[1/618] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[2/616] Compiling C object libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch.c.o
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch.h:15,
                 from ../hw/arm/ipod_touch.c:15:
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h: In function ‘convert_hex_key_to_bin’:
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:33:13: warning: unused variable ‘slen’ [-Wunused-variable]
   33 |         int slen = strlen(str);
      |             ^~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h: In function ‘s5l8900_8900_engine_write’:
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:57:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
   57 |         printf("Reading 8900 header with length %d at address 0x%08x\n", sizeof(header8900), value);
      |                                                 ~^                       ~~~~~~~~~~~~~~~~~~
      |                                                  |                       |
      |                                                  int                     long unsigned int
      |                                                 %ld
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:57:68: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
   57 |         printf("Reading 8900 header with length %d at address 0x%08x\n", sizeof(header8900), value);
      |                                                                 ~~~^                         ~~~~~
      |                                                                    |                         |
      |                                                                    unsigned int              uint64_t {aka long unsigned int}
      |                                                                 %08lx
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:73:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   73 |         else if( header->encrypted = 0x04 ) { encrypted = 0; }
      |                  ^~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:78:57: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
   78 |         printf("Will decrypt 8900 image at address 0x%08x (len: %d bytes)\n", value, data_len);
      |                                                      ~~~^                     ~~~~~
      |                                                         |                     |
      |                                                         unsigned int          uint64_t {aka long unsigned int}
      |                                                      %08lx
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:78:66: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘off_t’ {aka ‘long int’} [-Wformat=]
   78 |         printf("Will decrypt 8900 image at address 0x%08x (len: %d bytes)\n", value, data_len);
      |                                                                 ~^                   ~~~~~~~~
      |                                                                  |                   |
      |                                                                  int                 off_t {aka long int}
      |                                                                 %ld
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:86:32: warning: pointer targets in passing argument 1 of ‘convert_hex_key_to_bin’ differ in signedness [-Wpointer-sign]
   86 |         convert_hex_key_to_bin(ramdiskKey, aes_key, 16);
      |                                ^~~~~~~~~~
      |                                |
      |                                unsigned char *
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:31:42: note: expected ‘char *’ but argument is of type ‘unsigned char *’
   31 | static void convert_hex_key_to_bin(char *str, uint8_t *bytes, int maxlen)
      |                                    ~~~~~~^~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:87:9: warning: ‘AES_set_decrypt_key’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   87 |         AES_set_decrypt_key(aes_key, 128, &aes_decrypt_key);
      |         ^~~~~~~~~~~~~~~~~~~
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_aes.h:10,
                 from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch.h:13:
/usr/include/openssl/aes.h:54:5: note: declared here
   54 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
      |     ^~~~~~~~~~~~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:93:17: warning: ‘AES_cbc_encrypt’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   93 |                 AES_cbc_encrypt(inbuf + data_current, intbuf, AES_BLOCK_SIZE, &aes_decrypt_key, iv, 0);
      |                 ^~~~~~~~~~~~~~~
/usr/include/openssl/aes.h:66:6: note: declared here
   66 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:53:41: warning: unused variable ‘data_end’ [-Wunused-variable]
   53 |         off_t data_begin, data_current, data_end, data_len;
      |                                         ^~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:53:15: warning: variable ‘data_begin’ set but not used [-Wunused-but-set-variable]
   53 |         off_t data_begin, data_current, data_end, data_len;
      |               ^~~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:52:13: warning: variable ‘encrypted’ set but not used [-Wunused-but-set-variable]
   52 |         int encrypted;
      |             ^~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:50:23: warning: unused variable ‘keybuf’ [-Wunused-variable]
   50 |         unsigned char keybuf[16];
      |                       ^~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:48:23: warning: unused variable ‘ramdiskiv’ [-Wunused-variable]
   48 |         unsigned char ramdiskiv[1];
      |                       ^~~~~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_8900_engine.h:44:17: warning: unused variable ‘ctx’ [-Wunused-variable]
   44 |         AES_KEY ctx, aes_decrypt_key;
      |                 ^~~
../hw/arm/ipod_touch.c: In function ‘s5l8900_usb_phys_read’:
../hw/arm/ipod_touch.c:107:57: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘hwaddr’ {aka ‘long unsigned int’} [-Wformat=]
  107 |         fprintf(stderr, "%s: read invalid location 0x%08x\n", __func__, addr);
      |                                                      ~~~^               ~~~~
      |                                                         |               |
      |                                                         unsigned int    hwaddr {aka long unsigned int}
      |                                                      %08lx
../hw/arm/ipod_touch.c: In function ‘s5l8900_usb_phys_write’:
../hw/arm/ipod_touch.c:138:58: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘hwaddr’ {aka ‘long unsigned int’} [-Wformat=]
  138 |         fprintf(stderr, "%s: write invalid location 0x%08x\n", __func__, addr);
      |                                                       ~~~^               ~~~~
      |                                                          |               |
      |                                                          unsigned int    hwaddr {aka long unsigned int}
      |                                                       %08lx
../hw/arm/ipod_touch.c: In function ‘ipod_touch_machine_init’:
../hw/arm/ipod_touch.c:362:42: warning: passing argument 1 of ‘pl192_manual_init’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  362 |     DeviceState *dev = pl192_manual_init("vic0", qdev_get_gpio_in(DEVICE(nms->cpu), ARM_CPU_IRQ), qdev_get_gpio_in(DEVICE(nms->cpu), ARM_CPU_FIQ), NULL);
      |                                          ^~~~~~
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch.h:9:
/home/syboxez/gitstuff/qemu-ios/include/hw/intc/pl192.h:78:38: note: expected ‘char *’ but argument is of type ‘const char *’
   78 | DeviceState *pl192_manual_init(char *mem_name, ...);
      |                                ~~~~~~^~~~~~~~
../hw/arm/ipod_touch.c:369:29: warning: passing argument 1 of ‘pl192_manual_init’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  369 |     dev = pl192_manual_init("vic1", NULL);
      |                             ^~~~~~
/home/syboxez/gitstuff/qemu-ios/include/hw/intc/pl192.h:78:38: note: expected ‘char *’ but argument is of type ‘const char *’
   78 | DeviceState *pl192_manual_init(char *mem_name, ...);
      |                                ~~~~~~^~~~~~~~
../hw/arm/ipod_touch.c:602:15: warning: unused variable ‘pmu’ [-Wunused-variable]
  602 |     I2CSlave *pmu = i2c_slave_create_simple(i2c_state->bus, "pcf50633", 0x73);
      |               ^~~
../hw/arm/ipod_touch.c:592:15: warning: unused variable ‘accelerometer’ [-Wunused-variable]
  592 |     I2CSlave *accelerometer = i2c_slave_create_simple(i2c_state->bus, "lis302dl", 0x1D);
      |               ^~~~~~~~~~~~~
[3/616] Compiling C object libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch_sha1.c.o
FAILED: libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch_sha1.c.o 
cc -m64 -mcx16 -Ilibqemu-arm-softmmu.fa.p -I. -I.. -Itarget/arm -I../target/arm -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/pixman-1 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/opus -I/usr/include/cacard -I/usr/include/sysprof-6 -I/usr/include/nss -I/usr/include/nspr -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -isystem /home/syboxez/gitstuff/qemu-ios/linux-headers -isystem linux-headers -iquote . -iquote /home/syboxez/gitstuff/qemu-ios -iquote /home/syboxez/gitstuff/qemu-ios/include -iquote /home/syboxez/gitstuff/qemu-ios/disas/libvixl -iquote /home/syboxez/gitstuff/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-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="arm-softmmu-config-target.h"' '-DCONFIG_DEVICES="arm-softmmu-config-devices.h"' -MD -MQ libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch_sha1.c.o -MF libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch_sha1.c.o.d -o libqemu-arm-softmmu.fa.p/hw_arm_ipod_touch_sha1.c.o -c ../hw/arm/ipod_touch_sha1.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
../hw/arm/ipod_touch_sha1.c: In function ‘s5l8900_sha1_read’:
../hw/arm/ipod_touch_sha1.c:55:72: error: passing argument 1 of ‘swapLong’ makes pointer from integer without a cast [-Wint-conversion]
   55 |                 uint64_t data_length = swapLong(((uint64_t *)s->buffer)[s->buffer_ind / 8 - 1]) / 8;
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                                                                        |
      |                                                                        uint64_t {aka long unsigned int}
../hw/arm/ipod_touch_sha1.c:3:32: note: expected ‘void *’ but argument is of type ‘uint64_t’ {aka ‘long unsigned int’}
    3 | static uint64_t swapLong(void *X) {
      |                          ~~~~~~^
../hw/arm/ipod_touch_sha1.c:58:17: warning: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   58 |                 SHA1_Init(&ctx);
      |                 ^~~~~~~~~
In file included from /home/syboxez/gitstuff/qemu-ios/include/hw/arm/ipod_touch_sha1.h:10,
                 from ../hw/arm/ipod_touch_sha1.c:1:
/usr/include/openssl/sha.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
      |                           ^~~~~~~~~
../hw/arm/ipod_touch_sha1.c:59:17: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   59 |                 SHA1_Update(&ctx, s->buffer, data_length);
      |                 ^~~~~~~~~~~
/usr/include/openssl/sha.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
      |                           ^~~~~~~~~~~
../hw/arm/ipod_touch_sha1.c:60:17: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   60 |                 SHA1_Final(s->hashout, &ctx);
      |                 ^~~~~~~~~~
/usr/include/openssl/sha.h:51:27: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
      |                           ^~~~~~~~~~
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

After bypassing, I get:

  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc
[1/179] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[2/169] Linking target qemu-system-arm
FAILED: qemu-system-arm 
c++ -m64 -mcx16 @qemu-system-arm.rsp
/usr/bin/ld: libcommon.fa.p/ebpf_ebpf_rss.c.o: in function `ebpf_rss_load':
/home/syboxez/gitstuff/qemu-ios/build/../ebpf/ebpf_rss.c:55:(.text+0x19b): undefined reference to `bpf_program__set_socket_filter'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

My configure options: ../configure --enable-sdl --disable-cocoa --target-list=arm-softmmu --disable-capstone --disable-pie --disable-slirp --extra-ldflags='-lcrypto' --disable-werror
OS: Arch Linux
Branch: ipod_touch_1g

Getting the same results when trying to link to openssl-1.1 using these configure flags: ../configure --enable-sdl --disable-cocoa --target-list=arm-softmmu --disable-capstone --disable-pie --disable-slirp --extra-cflags=-I/usr/include/openssl-1.1 --extra-ldflags='-L/usr/lib/openssl-1.1 -lcrypto' --disable-werror

@daniilfigasystems
Copy link

Can i have your gcc version?

@syboxez
Copy link
Author

syboxez commented Aug 2, 2024

Can i have your gcc version?

GCC 14.1.1

@daniilfigasystems
Copy link

Can i have your gcc version?

GCC 14.1.1

Can I have full output of gcc —version?

@syboxez
Copy link
Author

syboxez commented Aug 4, 2024

gcc (GCC) 14.1.1 20240720
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@daniilfigasystems
Copy link

Install older gcc (12,13)

@syboxez
Copy link
Author

syboxez commented Aug 4, 2024

Install older gcc (12,13)

I tried using gcc 12.4.0 with the same results

gcc-12 (GCC) 12.4.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@daniilfigasystems
Copy link

Install older gcc (12,13)

I tried using gcc 12.4.0 with the same results

gcc-12 (GCC) 12.4.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reinstall openssl

@syboxez
Copy link
Author

syboxez commented Aug 4, 2024

Install older gcc (12,13)

I tried using gcc 12.4.0 with the same results
gcc-12 (GCC) 12.4.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reinstall openssl

It's handled by my package manager. I've tried both OpenSSL 3.3.1 and 1.1.1.

Also, the error I'm getting in gcc-12 is a linker error:

FAILED: qemu-system-arm 
g++-12 -m64 -mcx16 @qemu-system-arm.rsp
/usr/bin/ld: libcommon.fa.p/ebpf_ebpf_rss.c.o: in function `ebpf_rss_load':
/home/syboxez/gitstuff/qemu-ios/build/../ebpf/ebpf_rss.c:52:(.text+0x19b): undefined reference to `bpf_program__set_socket_filter'
/usr/bin/ld: /usr/lib/libhwy.so.1: undefined reference to `__extendbfsf2@GCC_13.0.0'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

@daniilfigasystems
Copy link

Install older gcc (12,13)

I tried using gcc 12.4.0 with the same results
gcc-12 (GCC) 12.4.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reinstall openssl

It's handled by my package manager. I've tried both OpenSSL 3.3.1 and 1.1.1.

Also, the error I'm getting in gcc-12 is a linker error:

FAILED: qemu-system-arm 
g++-12 -m64 -mcx16 @qemu-system-arm.rsp
/usr/bin/ld: libcommon.fa.p/ebpf_ebpf_rss.c.o: in function `ebpf_rss_load':
/home/syboxez/gitstuff/qemu-ios/build/../ebpf/ebpf_rss.c:52:(.text+0x19b): undefined reference to `bpf_program__set_socket_filter'
/usr/bin/ld: /usr/lib/libhwy.so.1: undefined reference to `__extendbfsf2@GCC_13.0.0'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

Did you tried gcc 13?

@syboxez
Copy link
Author

syboxez commented Aug 4, 2024

Install older gcc (12,13)

I tried using gcc 12.4.0 with the same results
gcc-12 (GCC) 12.4.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reinstall openssl

It's handled by my package manager. I've tried both OpenSSL 3.3.1 and 1.1.1.
Also, the error I'm getting in gcc-12 is a linker error:

FAILED: qemu-system-arm 
g++-12 -m64 -mcx16 @qemu-system-arm.rsp
/usr/bin/ld: libcommon.fa.p/ebpf_ebpf_rss.c.o: in function `ebpf_rss_load':
/home/syboxez/gitstuff/qemu-ios/build/../ebpf/ebpf_rss.c:52:(.text+0x19b): undefined reference to `bpf_program__set_socket_filter'
/usr/bin/ld: /usr/lib/libhwy.so.1: undefined reference to `__extendbfsf2@GCC_13.0.0'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

Did you tried gcc 13?

FAILED: qemu-system-arm 
g++-13 -m64 -mcx16 @qemu-system-arm.rsp
/usr/bin/ld: libcommon.fa.p/ebpf_ebpf_rss.c.o: in function `ebpf_rss_load':
/home/syboxez/gitstuff/qemu-ios/build/../ebpf/ebpf_rss.c:52:(.text+0x19b): undefined reference to `bpf_program__set_socket_filter'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1
gcc-13 (GCC) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@daniilfigasystems
Copy link

The problem in your libraries run apt upgrade or similar to your distribution if problem is not solved, try other distributions

@syboxez
Copy link
Author

syboxez commented Nov 28, 2024

The problem in your libraries run apt upgrade or similar to your distribution if problem is not solved, try other distributions

I tried again with the same compiler errors. I'm using Arch Linux, which is a rolling distribution that always ships the latest software, including libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants