From 48cb4bf039cf84870e2eb020a8b4fd87e508959e Mon Sep 17 00:00:00 2001 From: David Palacios <97840947+dpalacios69@users.noreply.github.com> Date: Tue, 24 Nov 2026 11:54:01 +0100 Subject: [PATCH 1/2] docs/linux.md: add root-free micromamba setup section (DOC-LINUX-FEDORA-NOROOT) --- docs/linux.md | 33 +++++++++++++++++++++++++++++++++ tests/test_docs_cli_flags.py | 1 + 2 files changed, 34 insertions(+) diff --git a/docs/linux.md b/docs/linux.md index e7ca27455f..f462aacbb0 100644 --- a/docs/linux.md +++ b/docs/linux.md @@ -112,3 +112,36 @@ python3 -I tests/test_.py # one standard- [testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing the GPU. + +### Without root (micromamba) + +If you cannot install distribution packages (no `sudo`), you can install `llvm-tools` and `spirv-tools` into a +user-owned folder with [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) +(x86-64 glibc; for ARM64 use `linux-aarch64` from the micromamba guide; musl/Alpine is not natively supported) and let +CMake fetch its pinned, hash-checked Vulkan headers: + +```bash +LEO=$HOME/leonida-tools +mkdir -p "$LEO/bin" "$LEO/mamba" +# Note: `latest` is unpinned and downloaded without signature verification; inspect or pin per the micromamba guide. +curl -fsSLo "$LEO/micromamba.tar.bz2" https://micro.mamba.pm/api/micromamba/linux-64/latest +tar -xjf "$LEO/micromamba.tar.bz2" -C "$LEO/bin" --strip-components=1 bin/micromamba + +export MAMBA_ROOT_PREFIX="$LEO/mamba" +"$LEO/bin/micromamba" create -y -n leonida -c conda-forge --override-channels "llvm-tools>=21" spirv-tools +export PATH="$LEO/mamba/envs/leonida/bin:$PATH" + +cmake -S runtime -B runtime/build/linux -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_VULKAN_HEADERS_FETCH=ON +cmake --build runtime/build/linux --parallel "$(nproc)" +LLVM_MC=llvm-mc LEONIDA_VK_DEVICE="" \ + python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --work "$LEO/run" --require-pass | tee "$LEO/run.log" +echo "runner exit: ${PIPESTATUS[0]}" +``` + +Notes: +- `LEONIDA_VK_DEVICE` selects the physical GPU by substring so the runner does not fall back to Mesa's `llvmpipe`. +- Keep `$LEO` on a filesystem without `noexec` (`findmnt -no OPTIONS "$LEO"`). +- System prerequisites still needed: a working Vulkan driver/loader (`vulkaninfo --summary`), `cmake`, `ninja`, `g++` + (or `clang++`), `python3`, `curl`, `tar`, and `bzip2`. +- Cleanup: delete `$LEO` and `runtime/build/linux`. micromamba also writes `~/.conda/environments.txt` and + `~/.mamba/pkgs/urls.txt` (delete only those files if you already use conda). diff --git a/tests/test_docs_cli_flags.py b/tests/test_docs_cli_flags.py index c88e4b85a1..37ddf3d483 100644 --- a/tests/test_docs_cli_flags.py +++ b/tests/test_docs_cli_flags.py @@ -25,6 +25,7 @@ # Flags of other programs the docs quote: gh (AGENTS.md), pip (docs/shader_validation.md), argparse itself, and # the spirv-opt passes docs/embedded_shaders.md tried on one module. FOREIGN = {"--search", "--state", "--index-url", "--help", + "--strip-components", "--override-channels", "--ssa-rewrite", "--eliminate-dead-code-aggressive", "--eliminate-dead-branches", "--merge-blocks", "--cfg-cleanup", "--merge-return", "--scalar-replacement"} # Pages that quote another project's tree (SCARAB, americas-recomp). From 22b8d285242ce9f0dc90e4c6ccc307cb659bb659 Mon Sep 17 00:00:00 2001 From: David Palacios <97840947+dpalacios69@users.noreply.github.com> Date: Tue, 24 Nov 2026 14:25:12 +0100 Subject: [PATCH 2/2] docs/linux.md: clarify Vulkan header fetch fallback when system headers absent --- docs/linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/linux.md b/docs/linux.md index f462aacbb0..c962b52b40 100644 --- a/docs/linux.md +++ b/docs/linux.md @@ -118,7 +118,7 @@ the GPU. If you cannot install distribution packages (no `sudo`), you can install `llvm-tools` and `spirv-tools` into a user-owned folder with [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) (x86-64 glibc; for ARM64 use `linux-aarch64` from the micromamba guide; musl/Alpine is not natively supported) and let -CMake fetch its pinned, hash-checked Vulkan headers: +CMake fetch its pinned, hash-checked Vulkan headers if the system does not provide them: ```bash LEO=$HOME/leonida-tools