Failed to build qemu e2k on Arch Linux #6

Closed
opened 2021-02-14 07:29:52 +01:00 by SiberiaBreadFactory · 1 comment

OS: Arch Linux Latest
GCC Version: 10.2.0
Steps for build:

mkdir build
cd build
../configure
make

Error Log:

[6505/8971] Compiling C object libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o
FAILED: libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o 
cc -Ilibqemu-e2k-linux-user.fa.p -I. -I.. -Itarget/e2k -I../target/e2k -I../linux-user/host/x86_64 -Ilinux-user -I../linux-user -I../linux-user/e2k -I../capstone/include/capstone -Itrace -Iqapi -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -Werror -std=gnu99 -O2 -g -isystem /home/b4d_us3r/builds/qemu-e2k/linux-headers -isystem linux-headers -iquote . -iquote /home/b4d_us3r/builds/qemu-e2k -iquote /home/b4d_us3r/builds/qemu-e2k/include -iquote /home/b4d_us3r/builds/qemu-e2k/disas/libvixl -iquote /home/b4d_us3r/builds/qemu-e2k/tcg/i386 -iquote /home/b4d_us3r/builds/qemu-e2k/accel/tcg -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 -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="e2k-linux-user-config-target.h"' '-DCONFIG_DEVICES="e2k-linux-user-config-devices.h"' -MD -MQ libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o -MF libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o.d -o libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o -c ../linux-user/syscall.c
In file included from ../target/e2k/cpu.h:4,
                 from ../linux-user/qemu.h:5,
                 from ../linux-user/syscall.c:129:
../linux-user/e2k/target_cpu.h: In function ‘cpu_clone_regs_child.part.0’:
/home/b4d_us3r/builds/qemu-e2k/include/qemu/bswap.h:365:5: error: ‘crs.cr1.<Udbe0>.hi’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  365 |     __builtin_memcpy(ptr, &v, sizeof(v));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../linux-user/qemu.h:763,
                 from ../linux-user/syscall.c:129:
../linux-user/e2k/target_cpu.h:23:16: note: ‘crs.cr1.<Udbe0>.hi’ was declared here
   23 |         E2KCrs crs;
      |                ^~~
In file included from ../target/e2k/cpu.h:4,
                 from ../linux-user/qemu.h:5,
                 from ../linux-user/syscall.c:129:
/home/b4d_us3r/builds/qemu-e2k/include/qemu/bswap.h:365:5: error: ‘crs.cr0_lo’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  365 |     __builtin_memcpy(ptr, &v, sizeof(v));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../linux-user/qemu.h:763,
                 from ../linux-user/syscall.c:129:
../linux-user/e2k/target_cpu.h:23:16: note: ‘crs.cr0_lo’ was declared here
   23 |         E2KCrs crs;
      |                ^~~
In file included from ../target/e2k/cpu.h:4,
                 from ../linux-user/qemu.h:5,
                 from ../linux-user/syscall.c:129:
/home/b4d_us3r/builds/qemu-e2k/include/qemu/bswap.h:365:5: error: ‘crs.cr0_hi’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  365 |     __builtin_memcpy(ptr, &v, sizeof(v));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../linux-user/qemu.h:763,
                 from ../linux-user/syscall.c:129:
../linux-user/e2k/target_cpu.h:23:16: note: ‘crs.cr0_hi’ was declared here
   23 |         E2KCrs crs;
      |                ^~~
cc1: all warnings being treated as errors
OS: Arch Linux Latest GCC Version: 10.2.0 Steps for build: ``` mkdir build cd build ../configure make ``` Error Log: ``` [6505/8971] Compiling C object libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o FAILED: libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o cc -Ilibqemu-e2k-linux-user.fa.p -I. -I.. -Itarget/e2k -I../target/e2k -I../linux-user/host/x86_64 -Ilinux-user -I../linux-user -I../linux-user/e2k -I../capstone/include/capstone -Itrace -Iqapi -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -Werror -std=gnu99 -O2 -g -isystem /home/b4d_us3r/builds/qemu-e2k/linux-headers -isystem linux-headers -iquote . -iquote /home/b4d_us3r/builds/qemu-e2k -iquote /home/b4d_us3r/builds/qemu-e2k/include -iquote /home/b4d_us3r/builds/qemu-e2k/disas/libvixl -iquote /home/b4d_us3r/builds/qemu-e2k/tcg/i386 -iquote /home/b4d_us3r/builds/qemu-e2k/accel/tcg -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 -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H '-DCONFIG_TARGET="e2k-linux-user-config-target.h"' '-DCONFIG_DEVICES="e2k-linux-user-config-devices.h"' -MD -MQ libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o -MF libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o.d -o libqemu-e2k-linux-user.fa.p/linux-user_syscall.c.o -c ../linux-user/syscall.c In file included from ../target/e2k/cpu.h:4, from ../linux-user/qemu.h:5, from ../linux-user/syscall.c:129: ../linux-user/e2k/target_cpu.h: In function ‘cpu_clone_regs_child.part.0’: /home/b4d_us3r/builds/qemu-e2k/include/qemu/bswap.h:365:5: error: ‘crs.cr1.<Udbe0>.hi’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 365 | __builtin_memcpy(ptr, &v, sizeof(v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../linux-user/qemu.h:763, from ../linux-user/syscall.c:129: ../linux-user/e2k/target_cpu.h:23:16: note: ‘crs.cr1.<Udbe0>.hi’ was declared here 23 | E2KCrs crs; | ^~~ In file included from ../target/e2k/cpu.h:4, from ../linux-user/qemu.h:5, from ../linux-user/syscall.c:129: /home/b4d_us3r/builds/qemu-e2k/include/qemu/bswap.h:365:5: error: ‘crs.cr0_lo’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 365 | __builtin_memcpy(ptr, &v, sizeof(v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../linux-user/qemu.h:763, from ../linux-user/syscall.c:129: ../linux-user/e2k/target_cpu.h:23:16: note: ‘crs.cr0_lo’ was declared here 23 | E2KCrs crs; | ^~~ In file included from ../target/e2k/cpu.h:4, from ../linux-user/qemu.h:5, from ../linux-user/syscall.c:129: /home/b4d_us3r/builds/qemu-e2k/include/qemu/bswap.h:365:5: error: ‘crs.cr0_hi’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 365 | __builtin_memcpy(ptr, &v, sizeof(v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../linux-user/qemu.h:763, from ../linux-user/syscall.c:129: ../linux-user/e2k/target_cpu.h:23:16: note: ‘crs.cr0_hi’ was declared here 23 | E2KCrs crs; | ^~~ cc1: all warnings being treated as errors ```
Owner

Thanks!

7d6aec84fd should fix the problem but I cannot reproduce it with gcc-9 or clang-11.

Thanks! https://git.mentality.rip/OpenE2K/qemu-e2k/commit/7d6aec84fdf4986ce42cbc124eb15959010cb820 should fix the problem but I cannot reproduce it with gcc-9 or clang-11.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: OpenE2K/qemu-e2k#6
No description provided.