The below wiki article is based on user submitted content. Please verify all hyperlinks and terminal commands below!
See a mistake? Want to contribute? Edit this article on Github
This article was written for developers. Users looking to simply run yuzu should try downloading Mainline first. As it is an AppImage, it only needs to be downloaded and made executable to use it.
You’ll need to download and install the following to build yuzu:
The following are handled by yuzu’s externals:
If version 5.15.2 is not already installed, pre-compiled binaries for Qt 5.15.2 will be downloaded from here automatically by CMake:
All other dependencies will be downloaded by vcpkg if needed:
If an ARM64 build is intended, export VCPKG_FORCE_SYSTEM_BINARIES=1
.
Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run.
sudo pacman -Syu --needed base-devel boost catch2 cmake ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt5 sdl2 zlib zstd zip unzip
-DCMAKE_CXX_FLAGS="-I/usr/include/qt/QtWebEngineWidgets"
with qt5-webengine installed.sudo apt-get install autoconf cmake g++-11 gcc-11 git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qtbase5-dev qtbase5-private-dev qtwebengine5-dev qtmultimedia5-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev
-DYUZU_USE_QT_WEB_ENGINE=ON
when running CMake.-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
when running CMake. i.e.-DYUZU_USE_EXTERNAL_SDL2=OFF
git submodule update --init --recursive
cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
sudo dnf install autoconf ccache cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt5-linguist qt5-qtbase{-private,}-devel qt5-qtwebengine-devel qt5-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel
clang
, and configure CMake to use it via -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF
-DYUZU_USE_EXTERNAL_FFMPEG=OFF
ffmpeg-devel
emerge --ask app-arch/lz4 dev-libs/boost dev-libs/hidapi dev-libs/libzip dev-libs/openssl dev-qt/linguist dev-qt/qtconcurrent dev-qt/qtcore dev-util/cmake dev-util/glslang dev-vcs/git media-libs/alsa-lib media-libs/opus media-sound/pulseaudio media-video/ffmpeg net-libs/mbedtls sys-libs/zlib x11-libs/libXext
pulseaudio
, bindist
and context
to the USE
flag.Master:
git clone --recursive https://github.com/yuzu-emu/yuzu
cd yuzu
Mainline:
git clone --recursive https://github.com/yuzu-emu/yuzu-mainline
cd yuzu-mainline
The --recursive
option automatically clones the required Git submodules.
If you need to run ctests, you can disable -DYUZU_TESTS=OFF
and install Catch2.
mkdir build && cd build
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
ninja
sudo ninja install
Optionally, you can use cmake-gui ..
to adjust various options (e.g. disable the Qt GUI).
mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
ninja
mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
ninja
After building, the binaries yuzu
and yuzu-cmd
(depending on your build options) will end up in build/bin/
.
# SDL
cd build/bin/
./yuzu-cmd
# Qt
cd build/bin/
./yuzu
cd data
gdb ../build/bin/yuzu # Start GDB
(gdb) handle SIGSEGV nostop # Disable SIGSEGV exceptions, which are used by yuzu for memory access
(gdb) run # Run yuzu under GDB
(gdb) bt # Print a backtrace of the entire callstack to see which codepath the crash occurred on
Advertisement
Advertisement