diff --git a/Building-for-Linux.md b/Building-for-Linux.md index 1d6624f..17db3ce 100644 --- a/Building-for-Linux.md +++ b/Building-for-Linux.md @@ -2,10 +2,9 @@ ### Tools -- `git` -- `curl` -- `cmake`, version 3.20 or newer for Dolphin 2512-116 and newer. -- C++ compiler such as `gcc`, with C++23 support for 2512-116 and newer. +- `ninja` +- `cmake`, version 3.25 or newer for Dolphin 2606-214 and newer. +- C++ compiler such as `gcc`, with C++23 support for Dolphin 2512-116 and newer. ### Required Dependencies @@ -40,7 +39,7 @@ Libraries will silently fall back to their vendored counterpart if they cannot b | :------------: | :------: | :----------: | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **Qt6** | ⬜ | >=6.0 | Only optional if `-DENABLE_HEADLESS=ON` is set. | `qt6-base-dev` `qt6-base-private-dev` `qt6-svg-dev` | `qt6-qtbase-devel` `qt6-qtbase-private-devel` `qt6-qtsvg-devel` | `qt6-base` `qt6-svg` | `qt6-qtbase-dev` `qt6-qtsvg-dev` | | **OpenGL** | ⬜ | | | `libgl1-mesa-dev` | `mesa-libGL-devel` | `libglvnd` | `glfw-dev` | -| **x11** | ⬜ | | Disable missing warnings with `-DENABLE_X11=OFF`. | `libx11-dev` `libxrandr-dev` `libxi-dev` | `libX11-devel` `libXrandr-devel` `libXi-devel` | `libx11` `libxrandr` `libxi` | `libx11-dev` `libxrandr-dev` `libxi-dev` | +| **x11** | ⬜ | | | `libx11-dev` `libxrandr-dev` `libxi-dev` | `libX11-devel` `libXrandr-devel` `libXi-devel` | `libx11` `libxrandr` `libxi` | `libx11-dev` `libxrandr-dev` `libxi-dev` | | **PkgConfig** | ⬜ | | | `pkg-config` | `pkgconf-pkg-config` | `pkgconf` | `pkgconf` | | **egl** | ⬜ | | Disable missing warnings with `-DENABLE_EGL=OFF`. | `libegl1-mesa-dev` | `mesa-libEGL-devel` | `libglvnd` | `mesa-egl` | | **FFmpeg** | ⬜ | | Disable missing warnings with `-DENCODE_FRAMEDUMPS=OFF`. | `libavcodec-dev` `libavformat-dev` `libavutil-dev` `libswresample-dev` `libswscale-dev` | `libavcodec-free-devel` `libavformat-free-devel` `libavutil-free-devel` `libswresample-free-devel` `libswscale-free-devel` | `ffmpeg` | `ffmpeg-dev` | @@ -50,7 +49,7 @@ Libraries will silently fall back to their vendored counterpart if they cannot b | **cubeb** | ✅ | | Disable with `-DENABLE_CUBEB=OFF`. | `libcubeb-dev` | `cubeb-devel` | Not in the repos. AUR: `cubeb` OR `cubeb-git` | Not in the repos | | **SFML** | ✅ | >=3.0 | | `libsfml-dev` Version 3.x currently not available on [Debian](https://packages.debian.org/libsfml-dev). | ~~`SFML-devel`~~ Version 3.x [currently not available](https://bugzilla.redhat.com/show_bug.cgi?id=2312363) | `sfml` | ~~`sfml-dev`~~ Version 3.x [Currently not available](https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/85247) | | **miniupnpc** | ✅ | >=1.6 | Disable with `-DUSE_UPNP=OFF`. | `libminiupnpc-dev` | `miniupnpc-devel` | `miniupnpc` | `miniupnpc-dev` | -| **mbedtls** | ✅ | >=2.0, <=3.0 | | ~~`libmbedtls-dev`~~ MbedTLS 2.x is no longer shipped from Debian Trixie forward and Ubuntu 25.04 forward. | ~~`mbedtls-devel`~~ MbedTLS 2.x is no longer shipped from Fedora 42 forward. | ~~`mbedtls2`~~ MbedTLS 2.x is no longer shipped as of 28/06/2026 | `mbedtls2-dev` | +| **mbedtls** | ✅ | >=2.0, <=3.0 | | ~~`libmbedtls-dev`~~ MbedTLS 2.x is no longer shipped from Debian Trixie forward and Ubuntu 25.04 forward. | ~~`mbedtls-devel`~~ MbedTLS 2.x is no longer shipped from Fedora 42 forward. | `mbedtls2` | `mbedtls2-dev` | | **iconv** | ✅ | >=1.14 | | Built-in | Built-in | `libiconv` | Built-in | | **mgba** | ✅ | | Disable with `-DUSE_MGBA=OFF` or `DENABLE_HEADLESS=ON`. | ~~`libmgba-dev`~~ Newer MGBA versions are currently broken with Dolphin. | Not in the repos | ~~`libmgba`~~ Newer MGBA versions are currently broken with Dolphin. | ~~`libmgba-dev`~~ Newer MGBA versions are currently broken with Dolphin. | | **systemd** | ⬜ | | | `libsystemd-dev` | `systemd-devel` | `systemd-libs` | N/A | @@ -340,7 +339,7 @@ pacman -Syu \ # MiniUPNPC miniupnpc \ # MbedTLS - ## No longer part of the repos + mbedtls2 \ # cURL curl \ # hidapi @@ -485,71 +484,21 @@ crew install xorg_nouveau_driver -## Checkout Dolphin - -1. `git clone https://github.com/dolphin-emu/dolphin` -2. `cd dolphin` -3. Add necessary submodules and check for new commits - -```sh -git -c submodule."Externals/Qt".update=none \ --c submodule."Externals/FFmpeg-bin".update=none \ --c submodule."Externals/libadrenotools".update=none \ -submodule update --init --recursive \ -&& git pull --recurse-submodules -``` - ## Building -If your system’s default compiler is too old to support C++20, you’ll need to specify a newer version manually when configuring the build. +If your system’s default compiler is too old to support C++23, you’ll need to specify a newer version manually when configuring the build. For example, on Ubuntu 20.04, you can install `gcc-13` from [this PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test) or `clang-18` from [LLVM's APT repository](https://apt.llvm.org/). After installation, use the newer compiler explicitly during configuration, like so: ```sh -cmake .. -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 +cmake --preset ninja-release-x64 -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 # or -cmake .. -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 +cmake --preset ninja-release-x64 -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 ``` -### Global Build (if unsure, use this option) - -```sh -mkdir build && cd build - -cmake .. - -make -j$(nproc) - -sudo make install # Optional, to install Dolphin -``` - -### Local Build - -```sh -mkdir build && cd build - -cmake .. -DLINUX_LOCAL_DEV=true - -make -j$(nproc) - -ln -s ../../Data/Sys Binaries/ -``` - -### Portable Build - -```sh -mkdir build && cd build - -cmake .. -DLINUX_LOCAL_DEV=true - -make -j$(nproc) - -cp -r ../Data/Sys/ Binaries/ - -touch Binaries/portable.txt -``` +You may then proceed with the clone instructions in the [Cloning](https://github.com/dolphin-emu/dolphin/wiki/Cloning) guide and build instructions in the [Building With CMake](https://github.com/dolphin-emu/dolphin/wiki/Building-with-CMake) guide. ### Distributable .deb Package @@ -557,13 +506,9 @@ Following the instructions from [the PR where this feature was implemented](http ```sh sudo apt install dpkg-dev file - -mkdir build && cd build - -cmake .. -DCPACK_PACKAGE_CONTACT="Your Name Here" # You're responsible for what you distribute. - -make -j$(nproc) - +cmake --preset ninja-release-x64 -DCPACK_PACKAGE_CONTACT="Your Name Here" # You're responsible for what you distribute. +cmake --build --preset ninja-build-release-x64 +cd build/x64/ cpack -G DEB ``` @@ -582,4 +527,4 @@ Dolphin maintains official Flatpak repositories for both [releases](https://flat ## Troubleshooting - The compiler will normally tell you what's going on if you run into an error. Read the error messages closely and look them up verbatim to see if it's something missing on your system and/or a typo in recent Dolphin commits. -- Need more speed? As an alternative to `cmake ..` during the build process, type `cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-march=native -DCMAKE_C_FLAGS=-march=native` instead. The resulting build will be optimized specifically for YOUR processor! The difference is more noticeable the weaker your computer is. Note that this may result in longer compile times, and the binaries you build will almost certainly be unusable on any computer besides your own. AUR users of `*-git` packages can get a similar effect by following +- Need more speed? Add the `-DCMAKE_CXX_FLAGS=-march=native -DCMAKE_C_FLAGS=-march=native` configure-time flags. The resulting build will be optimized specifically for YOUR processor! The difference is more noticeable the weaker your computer is. Note that this may result in longer compile times, and the binaries you build will almost certainly be unusable on any computer besides your own. AUR users of `*-git` packages can get a similar effect by following