Repository navigation
Update build-from-source docs for 8.10+ and fix build.sh flag handling - #15454
YaacovHazan merged 15 commits into
Conversation
|
Ran every Linux section of the updated build instructions end-to-end in fresh Docker containers (aarch64), using the
RedisBloom/RedisJSON/RedisTimeSeries built fine everywhere except the EL8 python3 issue below; where the build succeeded, 1. RediSearch fails on Ubuntu 20.04/22.04/24.04 and Debian 12/13 — LTO LLVM mismatch
Only the Ubuntu 26.04, Alma/Rocky 10.1, and Alpine sections currently end up with clang/LLVM 21. Verified fix: adding 2. Alma/Rocky 8.10 and 9.7 —
|
|
Following the end-to-end test results above, here are the concrete README edits needed so each "Build from source" section actually succeeds. All are verified by the runs above (aarch64 containers, A. Run step — every OS:
|
|
Correction to (B) above — LTO=0 isn't the right fix. We already made LTO=1 build on all these OSes (that's what RediSearch #10373 does); the manual instructions just need to install the same toolchain (B, revised) Ubuntu 20.04 / 22.04 / 24.04, Debian 12 / 13: install clang-21, keep LTO=1The failure is only that the distro wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
sudo bash /tmp/llvm.sh 21
sudo apt-get install -y clang-21 lld-21 llvm-21 libclang-21-devThen No (A), (C), (D) stand as written — note (C)'s EL8/EL9 already ship clang 21.1.8 natively, so they only need So the net per-OS shape is: install the matching LLVM 21 toolchain (apt.llvm.org on Ubuntu/Debian; |
…e tarball - Run step on every OS: redis-full.conf -> redis.conf. Release tarballs bake the module config into redis.conf and ship no redis-full.conf; the configuration-files note now explains the tarball/checkout split. - Ubuntu 20.04/22.04/24.04, Debian 12/13: add an 'Install the LLVM 21 toolchain' step (apt.llvm.org). INSTALL_RUST_TOOLCHAIN=yes installs Rust 1.94 (LLVM 21) and RediSearch's default cross-language LTO needs a matching clang/lld, which these releases do not package. - AlmaLinux/Rocky 8.10 and 9.7: add lld + llvm to the dnf list (clang there is already LLVM 21); on 8.10 make python3.11 the default python3 so the module builds find a pip-capable python3. - Alpine: drop 'make modules-update' — the tarball bundles the pinned module sources and modules/README.md says not to run it from a tarball. Verified in fresh per-OS Docker containers (aarch64); details on redis#15454. Co-Authored-By: Claude Fable 5 <[email protected]>
… flag Every Linux section gains an 'Install the Rust toolchain' step after the extract step (make -C modules install-rust INSTALL_RUST_TOOLCHAIN=yes — the pinned, checksum-verified recipe), and the Build step drops the INSTALL_RUST_TOOLCHAIN=yes export. Toolchain provisioning now reads as an explicit prerequisite, consistent with the LLVM 21 step and the macOS section's standalone Rust install; cross-references updated accordingly. Co-Authored-By: Claude Fable 5 <[email protected]>
Replace 'make -C modules install-rust' with the underlying installer commands (wget the official standalone tarball, install.sh, cleanup), matching the macOS section's style. Per-OS variants: -gnu vs -musl (Alpine), sudo only in sections that use it. Co-Authored-By: Claude Fable 5 <[email protected]>
clang compiles RediSearch's C++ against the newest installed GCC's libstdc++, and VectorSimilarity uses C++20 library features (std::bit_cast, chrono calendar types) that libstdc++ 10 lacks: error: no template named 'bit_cast' in namespace 'std' error: no member named 'year_month_day' in namespace 'std::chrono' Install gcc-11/g++-11 from ppa:ubuntu-toolchain-r/test (the same source RediSearch's own focal bootstrap uses) and point the gcc alternatives at 11. Verified end-to-end in a fresh ubuntu:20.04 container. Co-Authored-By: Claude Fable 5 <[email protected]>
README: fix per-OS build-from-source instructions for the full-release tarball
|
Re-ran the full per-OS validation against the current head (a06c8c8) — i.e. the README text now on this PR, executed verbatim as a script per OS section in fresh Docker containers (aarch64). Success criterion: full build and With the Search/TS that are about to be released — all greenBuilt with
So once the retag lands and the release tarball pins the new tags, these instructions are good as written. Against the existing 8.10.0 pre-release tarballThe five sections whose toolchain already matches build the current asset green verbatim: Ubuntu 26.04, Alma/Rocky 8.10 / 9.7 / 10.1, Alpine. Ubuntu 20.04/22.04/24.04 and Debian 12/13 fail with it only because the pinned RediSearch v8.9.82 probes the unversioned export PATH="/usr/lib/llvm-21/bin:$PATH"(apt.llvm.org ships the unversioned tools there.) Optional for this PR since the release will carry the new tags — happy to push it if you want the instructions to also cover the current asset. Full logs available; harness: one fresh container per section, two concurrent builds, |
| mkdir -p /usr/src | ||
| cd /usr/src | ||
| # Redis 8.10 and above — full release that bundles the modules (<tag>, e.g. redis-docker-10): | ||
| wget -O redis-<version>.tar.gz https://github.com/redis/redis/releases/download/<tag>/redis-full.tar.gz |
There was a problem hiding this comment.
Use version insted of tag on this string
| ```sh | ||
| cd /usr/src | ||
| # Redis 8.10 and above — full release that bundles the modules (<tag>, e.g. redis-docker-10): | ||
| wget -O redis-<version>.tar.gz https://github.com/redis/redis/releases/download/<tag>/redis-full.tar.gz |
| cd /usr/src | ||
| wget -O redis-<version>.tar.gz https://github.com/redis/redis/archive/refs/tags/<version>.tar.gz | ||
| # <version>, e.g. 8.10.0 — full release that bundles the modules: | ||
| wget -O redis-full.tar.gz https://github.com/redis/redis/releases/download/<version>/redis-full.tar.gz |
There was a problem hiding this comment.
use as befor redis-.tar.gz
There was a problem hiding this comment.
Fixed — local file now saved as redis-.tar.gz (via -O); release asset URL stays redis-full.tar.gz. Applied to all sections.
| tar xvf redis-<version>.tar.gz | ||
| rm redis-<version>.tar.gz | ||
| tar xvf redis-full.tar.gz | ||
| rm redis-full.tar.gz |
There was a problem hiding this comment.
can be like befor redis-.tar.gz
There was a problem hiding this comment.
Fixed — local file now saved as redis-.tar.gz (via -O); release asset URL stays redis-full.tar.gz. Applied to all sections.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Reviewed by Cursor Bugbot for commit 0381830. Configure here.
| apt-get update | ||
| apt-get install -y sudo | ||
| sudo apt-get install -y --no-install-recommends ca-certificates wget dpkg-dev gcc g++ libc6-dev libssl-dev make git python3 python3-pip python3-venv python3-dev unzip rsync clang automake autoconf gcc-10 g++-10 libtool | ||
| sudo apt-get install -y --no-install-recommends ca-certificates wget dpkg-dev gcc g++ libc6-dev libssl-dev make git python3 python3-pip python3-venv python3-dev unzip rsync clang automake autoconf libtool |
There was a problem hiding this comment.
We do not support focal builds at least since 8.8 (maybe earlier), I think this section could be deleted to not create a false expectations.

Followup #15253
Updates build-from-source documentation for Redis 8.10+: release flows use redis-full.tar.gz, start the server with redis.conf (module config baked into release tarballs), and document explicit Rust 1.94 and LLVM 21 / lld where RediSearch LTO needs them—instead of relying on INSTALL_RUST_TOOLCHAIN=yes and make modules-update in those paths. Ubuntu 20.04 instructions switch to GCC 11 (PPA) for C++20 libstdc++; Alma/Rocky sections add lld/llvm, python3 alternatives on 8.10, and drop make modules-update on Alma 10.
scripts/build.sh now runs modules install-rust when INSTALL_RUST_TOOLCHAIN=yes, so make build matches the modules Makefile behavior. The obsolete handle-werrors target has been removed from the modules Makefile (matching #15257): it is no longer required and was causing build errors, so DISABLE_WERRORS no longer strips -Werror via this path.
Note
Low Risk
Changes are limited to documentation and optional build-script/Makefile behavior; no Redis server or module runtime logic is modified.
Overview
Build-from-source docs for Redis 8.10+ are rewritten across OS-specific README sections: sources come from
redis-full.tar.gz, servers start withredis.conf(module settings baked into release tarballs), andINSTALL_RUST_TOOLCHAIN=yes/make modules-updateare dropped from those release flows in favor of pinned Rust 1.94.0 and LLVM 21 / lld where RediSearch C/Rust LTO needs them. Ubuntu 20.04 moves to GCC 11 via PPA; Alma/Rocky sections add lld/llvm, python3 alternatives on 8.10, and dropmake modules-updateon Alma 10.The top-level config blurb now contrasts release tarball
redis.confvs git checkoutredis-full.conf, with a link to 8.8 docs for older versions.scripts/build.shrunsmake -C modules install-rustwhenINSTALL_RUST_TOOLCHAIN=yes, somake buildprovisions Rust the same way the modules Makefile already could.modules/Makefiledrops thehandle-werrorstarget (andDISABLE_WERRORSno longer strips-Werroron module sources).modules/README.mdadds 8.10+ tarball guidance pointing at the main README.Reviewed by Cursor Bugbot for commit bbfd9c8. Bugbot is set up for automated code reviews on this repo. Configure here.