Hi On Tue, Jun 8, 2021 at 8:55 PM Peter Maydell <peter.mayd...@linaro.org> wrote:
> On Tue, 8 Jun 2021 at 16:55, Marc-André Lureau > <marcandre.lur...@gmail.com> wrote: > > > > Hi > > > > On Mon, Jun 7, 2021 at 4:17 PM Peter Maydell <peter.mayd...@linaro.org> > wrote: > > >> >> clang sanitizer build: link failure: > >> >> subprojects/libslirp/libslirp.so.0.3.0.p/src_arp_table.c.o: In > >> >> function `arp_table_add': > >> >> > /home/petmay01/linaro/qemu-for-merges/build/clang/../../subprojects/libslirp/src/arp_table.c:51: > >> >> undefined reference to `__ubsan_handle_type_mismatch_v1' > >> >> > /home/petmay01/linaro/qemu-for-merges/build/clang/../../subprojects/libslirp/src/arp_table.c:51: > >> >> undefined reference to `__ubsan_handle_type_mismatch_v1' > >> >> > /home/petmay01/linaro/qemu-for-merges/build/clang/../../subprojects/libslirp/src/arp_table.c:51: > >> >> undefined reference to `__ubsan_handle_type_mismatch_v1' > >> >> > /home/petmay01/linaro/qemu-for-merges/build/clang/../../subprojects/libslirp/src/arp_table.c:34: > >> >> undefined reference to `__ubsan_handle_type_mismatch_v1' > >> >> > /home/petmay01/linaro/qemu-for-merges/build/clang/../../subprojects/libslirp/src/arp_table.c:34: > >> >> undefined reference to `__ubsan_handle_type_mismatch_v1' > >> >> (and lots more similar) > >> > >> > I don't get this when running make vm-build-netbsd. What else am I > missing? > >> > >> > >> This isn't NetBSD related, it's just a clang sanitizer build on Linux. > > > > > > > > I am running configure with '--enable-sanitizers' --cc=clang > --cxx=clang++ --host-cc=clang, I can't reproduce. > > > > What's your distro? (or meson + clang versions) > > Ubuntu 18.04.5 LTS (bionic); configure arguments > '--cc=clang' '--cxx=clang++' '--enable-gtk' > '--extra-cflags=-fsanitize=undefined -fno-sanitize=shift-base > -Werror' > clang version 6.0.0-1ubuntu2 Per subproject `default_library` was added in 0.54, and we require 0.55.3. Why is it trying to build libslirp.so? I tried to make vm-build-ubuntu.i386 with the following changes: diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 47681b6f87..21d0b64eb1 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -18,7 +18,7 @@ import ubuntuvm DEFAULT_CONFIG = { 'install_cmds' : "apt-get update,"\ "apt-get build-dep -y qemu,"\ - "apt-get install -y libfdt-dev language-pack-en ninja-build", + "apt-get install -y libfdt-dev language-pack-en ninja-build clang", } class UbuntuX86VM(ubuntuvm.UbuntuVM): @@ -32,7 +32,7 @@ class UbuntuX86VM(ubuntuvm.UbuntuVM): cd $(mktemp -d); sudo chmod a+r /dev/vdb; tar -xf /dev/vdb; - ./configure {configure_opts}; + ./configure {configure_opts} --cc=clang --cxx=clang++ --host-cc=clang --extra-cflags='-fsanitize=undefined -fno-sanitize=shift-base -Werror'; make --output-sync {target} -j{jobs} {verbose}; """ (or with EXTRA_CONFIGURE_OPTS) And it failed with: [2363/9207] Linking target qemu-system-aarch64 FAILED: qemu-system-aarch64 clang++ @qemu-system-aarch64.rsp libqemu-aarch64-softmmu.fa.p/accel_tcg_cputlb.c.o: In function `helper_atomic_cmpxchgq_le_mmu': /tmp/tmp.VkWONZ62bA/build/../accel/tcg/atomic_template.h:86: undefined reference to `__atomic_compare_exchange_8' libqemu-aarch64-softmmu.fa.p/accel_tcg_cputlb.c.o: In function `helper_atomic_xchgq_le_mmu': /tmp/tmp.VkWONZ62bA/build/../accel/tcg/atomic_template.h:134: undefined reference to `__atomic_exchange_8' libqemu-aarch64-softmmu.fa.p/accel_tcg_cputlb.c.o: In function `helper_atomic_fetch_addq_le_mmu': Any idea what I am missing? thanks -- Marc-André Lureau