From f1195b9791665116f45db7cf5526d26c3abe0eb0 Mon Sep 17 00:00:00 2001 From: CEnnisgit Date: Sun, 12 Jul 2026 07:36:37 -0400 Subject: [PATCH] docs: list all required build dependencies and clang version in BUILDING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On a fresh Ubuntu 24.04 install, following BUILDING.md fails at configure time: Vulkan-Loader requires pkg-config and hidapi requires libudev-dev. Without the X11/Wayland dev headers, Vulkan-Loader and GLFW silently build without window-system support. CI already installs all of these (.github/workflows/rpcsx.yml); this brings the docs in line with it. Also document the clang toolchain requirements: clang >= 19 for C++23 relaxed constexpr (P2448) — clang 18 fails in rx/StaticString.hpp and gcn-shader/src/eval.cpp — plus clang-tools for the clang-scan-deps binary CMake needs for dependency scanning. Verified: g++-14 and clang-20 build commit e8ae1481a clean; clang-18 does not. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WyB6A1ZejZwDLADJ9J525Y --- .github/BUILDING.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/BUILDING.md b/.github/BUILDING.md index 9f5a13360..f3a6e6244 100644 --- a/.github/BUILDING.md +++ b/.github/BUILDING.md @@ -3,9 +3,13 @@ ### The dependencies for Debian-like distributions. ``` -sudo apt install build-essential cmake libunwind-dev libsox-dev git libasound2-dev nasm g++-14 +sudo apt install build-essential cmake pkg-config libunwind-dev libsox-dev git libasound2-dev nasm g++-14 \ + libudev-dev libxcb1-dev libx11-dev libwayland-dev libxkbcommon-dev libxrandr-dev \ + libxinerama-dev libxcursor-dev libxi-dev libxext-dev ``` +Without `pkg-config` and `libudev-dev` the configure step fails (Vulkan-Loader and hidapi respectively); without the X11/Wayland headers Vulkan-Loader and GLFW are built without window-system support. This list matches what CI installs (`.github/workflows/rpcsx.yml`). + ### The dependencies for Fedora distributions: ``` @@ -34,3 +38,12 @@ For Ubuntu 24.04 you need to manually specify compiler version: ``` cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_INIT="-march=native" -DCMAKE_CXX_COMPILER=g++-14 && cmake --build build -j$(nproc) ``` + +### Building with clang + +clang 20 or newer is required: clang 18 rejects the codebase's C++23 relaxed `constexpr` (P2448, e.g. in `rx/StaticString.hpp` and `rpcsx/gpu/lib/gcn-shader/src/eval.cpp`), and clang 19 fails on the enum-reflection code in `rx/format.hpp` (its `-Wenum-constexpr-conversion` diagnostic is not SFINAE-friendly). The matching `clang-tools` package is also needed, since CMake invokes `clang-scan-deps` for dependency scanning: + +``` +sudo apt install clang-20 clang-tools-20 +cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_INIT="-march=native" -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 && cmake --build build -j$(nproc) +```