HWI icon indicating copy to clipboard operation
HWI copied to clipboard

test: unable to build Jade emulator on Ubuntu 21.10

Open Sjors opened this issue 3 years ago • 2 comments

This might need something similar to https://github.com/bitcoin-core/HWI/pull/565/commits/22fcbd92a0309d397543bf7b3ffb5d97ba504924

./setup_environment.sh --jade
+ mkdir -p work
+ cd work
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n 1 ]]
+ mkdir -p jade
+ cd jade
+ '[' '!' -d jade ']'
+ cd jade
+ git fetch
+ UPSTREAM='@{u}'
++ git rev-parse @
+ LOCAL=7ec429528712a16c0f2e67f10a84cc484436918b
++ git rev-parse '@{u}'
+ REMOTE=7ec429528712a16c0f2e67f10a84cc484436918b
++ git merge-base @ '@{u}'
+ BASE=7ec429528712a16c0f2e67f10a84cc484436918b
+ '[' 7ec429528712a16c0f2e67f10a84cc484436918b = 7ec429528712a16c0f2e67f10a84cc484436918b ']'
+ echo Up-to-date
Up-to-date
+ git submodule update --recursive --init
++ grep 'ARG ESP_IDF_BRANCH=' Dockerfile
++ cut -d= -f2
+ ESP_IDF_BRANCH=v4.4
++ grep 'ARG ESP_IDF_COMMIT=' Dockerfile
++ cut -d= -f2
+ ESP_IDF_COMMIT=8153bfe4125e6a608abccf1561fd10285016c90a
++ grep 'ARG ESP_QEMU_BRANCH=' Dockerfile
++ cut -d= -f2
+ ESP_QEMU_BRANCH=esp-develop-20210826
++ grep 'ARG ESP_QEMU_COMMIT=' Dockerfile
++ cut -d= -f2
+ ESP_QEMU_COMMIT=fd85235d17cd8813d6a31f5ced3c5acbf1933718
+ cd ..
+ '[' '!' -d qemu ']'
+ cd qemu
+ git fetch
+ git checkout fd85235d17cd8813d6a31f5ced3c5acbf1933718
HEAD is now at fd85235 hw/xtensa: add ESP32 machine
+ git submodule update --recursive --init
+ ninja -C build
ninja: Entering directory `build'
[29/1077] Generating qemu-version.h with a meson_exe.py custom command
fatal: No names found, cannot describe anything.
[50/1074] Compiling C object libcommon.fa.p/disas_i386.c.o
FAILED: libcommon.fa.p/disas_i386.c.o 
cc -Ilibcommon.fa.p -I../dtc/libfdt -I../slirp -I../slirp/src -I. -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/libusb-1.0 -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/include/pixman-1 -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /home/dev/HWI/test/work/jade/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/dev/HWI/test/work/jade/qemu -iquote /home/dev/HWI/test/work/jade/qemu/include -iquote /home/dev/HWI/test/work/jade/qemu/disas/libvixl -iquote /home/dev/HWI/test/work/jade/qemu/tcg/i386 -pthread -fsanitize=undefined -fsanitize=address -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 -fPIC -D_REENTRANT -MD -MQ libcommon.fa.p/disas_i386.c.o -MF libcommon.fa.p/disas_i386.c.o.d -o libcommon.fa.p/disas_i386.c.o -c ../disas/i386.c
In file included from /usr/include/string.h:519,
                 from /home/dev/HWI/test/work/jade/qemu/include/qemu/osdep.h:87,
                 from ../disas/i386.c:34:
In function ‘strcpy’,
    inlined from ‘PNI_Fixup’ at ../disas/i386.c:6434:4,
    inlined from ‘PNI_Fixup’ at ../disas/i386.c:6400:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:79:10: error: ‘__builtin_memcpy’ offset [0, 7] is out of the bounds [0, 0] [-Werror=array-bounds]
   79 |   return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strcpy’,
    inlined from ‘PNI_Fixup’ at ../disas/i386.c:6427:4,
    inlined from ‘PNI_Fixup’ at ../disas/i386.c:6400:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:79:10: error: ‘__builtin_memcpy’ offset [0, 5] is out of the bounds [0, 0] [-Werror=array-bounds]
   79 |   return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[57/1074] Compiling C object libcommon.fa.p/hw_scsi_lsi53c895a.c.o
ninja: build stopped: subcommand failed.

cc @JamieDriver

Sjors avatar Feb 10 '22 08:02 Sjors

Ping @JamieDriver

gruve-p avatar Apr 02 '22 11:04 gruve-p

Sorry I missed this - thanks for the ping @gruve-p.
I will push a PR with the recommended flag poked into the qemu build - is there a docker image to test this on, or are you happy to try that branch and feedback ?
Cheers.

update: https://github.com/bitcoin-core/HWI/pull/592

JamieDriver avatar Apr 04 '22 10:04 JamieDriver