From a7f61a15af66f9d227f4ab8f53122d9fccf01210 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Fri, 28 Apr 2023 16:14:06 +0200 Subject: [PATCH] Toolchain: Fix self-built QEMU crashing on startup on macOS If the SDL libraries are present on the system, QEMU will attempt to use that for rendering the UI. This causes a crash when the AArch64 port starts up with the following message: > NSWindow drag regions should only be invalidated on the Main Thread! Fix this by explicitly disabling SDL support. --- Toolchain/BuildQemu.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Toolchain/BuildQemu.sh b/Toolchain/BuildQemu.sh index f7a87de1ab..f8f5136083 100755 --- a/Toolchain/BuildQemu.sh +++ b/Toolchain/BuildQemu.sh @@ -53,9 +53,13 @@ if [ -z "$MAKEJOBS" ]; then MAKEJOBS=$(nproc) fi +EXTRA_ARGS="" if [[ $(uname) == "Darwin" ]] then UI_LIB=cocoa + + # SDL causes a crash on startup: "NSWindow drag regions should only be invalidated on the Main Thread!" + EXTRA_ARGS="--disable-sdl" else UI_LIB=gtk fi @@ -66,7 +70,8 @@ pushd "$DIR/Build/qemu" "$DIR"/Tarballs/qemu-"${QEMU_VERSION}"/configure --prefix="$PREFIX" \ --target-list=aarch64-softmmu,x86_64-softmmu \ --enable-$UI_LIB \ - --enable-slirp || exit 1 + --enable-slirp \ + $EXTRA_ARGS || exit 1 make -j "$MAKEJOBS" || exit 1 make install || exit 1 popd