From 31def413cc7c59d74cdec395b70176fb9181b543 Mon Sep 17 00:00:00 2001 From: Erica Franco Date: Sat, 10 Oct 2026 12:35:12 -0600 Subject: [PATCH] fix(docs): Linux build prerequisites only name Debian packages (#2437) The prerequisites listed `libxkbcommon-dev ... libgtk-3-dev`, which exist only on Debian and Ubuntu: on Arch none of those names resolve and `pacman -S` fails on the whole line, and on Fedora and openSUSE they all need `-devel`. Nothing else in the repository gives the equivalents. The app already speaks four distros at runtime: linux_libs.rs carries a {soname, debian, fedora, arch, suse} table, reads ID and ID_LIKE from /etc/os-release and prints the matching apt, dnf, pacman or zypper command when a runtime library is missing. This brings the build instructions up to that. Also adds the prerequisites to the book's Building page, which said only to install the Rust toolchain. Co-authored-by: Brandon Thomas --- book/src/getting-started/building.md | 4 ++++ docs/development.md | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/book/src/getting-started/building.md b/book/src/getting-started/building.md index 83edc917af..d32307a4f0 100644 --- a/book/src/getting-started/building.md +++ b/book/src/getting-started/building.md @@ -2,6 +2,10 @@ PhotoCraft uses the Rust workspace at the repository root. Install the stable Rust toolchain, clone the repository, and run commands from that root. +On Linux, install the windowing, GL and GTK development packages first. The development guide's +[Prerequisites](https://github.com/storytold/photocraft/blob/main/docs/development.md#prerequisites) +list them for Debian/Ubuntu, Fedora, Arch and openSUSE. + ```sh cargo build --workspace cargo run --release -p photocraft -- image.psd diff --git a/docs/development.md b/docs/development.md index 7d2f09bf00..3b69f0d036 100644 --- a/docs/development.md +++ b/docs/development.md @@ -3,7 +3,11 @@ ## Prerequisites - Rust stable (1.95+). Add the web target with `rustup target add wasm32-unknown-unknown`. -- macOS, Windows or Linux. Linux needs `libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libgtk-3-dev`. +- macOS, Windows or Linux. On Linux, install the windowing, GL and GTK development packages: + - Debian/Ubuntu: `sudo apt install libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libgtk-3-dev` + - Fedora/RHEL: `sudo dnf install libxkbcommon-devel wayland-devel libX11-devel libXrandr-devel libXi-devel mesa-libGL-devel gtk3-devel` + - Arch: `sudo pacman -S libxkbcommon wayland libx11 libxrandr libxi mesa gtk3` + - openSUSE: `sudo zypper install libxkbcommon-devel wayland-devel libX11-devel libXrandr-devel libXi-devel Mesa-libGL-devel gtk3-devel` ### Windows source builds