Skip to content

Commit

Permalink
Toolchain: Fix self-built QEMU crashing on startup on macOS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BertalanD authored and awesomekling committed Apr 29, 2023
1 parent 6aa392f commit a7f61a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Toolchain/BuildQemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit a7f61a1

Please sign in to comment.