Repository navigation
[0.8] MOD-14130 Fix build failures on focal cross-compilation and x86 with old binutils - #1126
Conversation
… with old binutils (#912) Backport of #912 to 0.8. The binutils check replaces the Ubuntu 18.04 special case: GCC accepts -mavx512fp16 while focal's binutils 2.34 cannot assemble the FP16 instructions, so CXX_AVX512FP16 is turned off below binutils 2.38 and CXX_AVX512BF16 below 2.34. Spaces are gated on the target architecture (CMAKE_SYSTEM_PROCESSOR) rather than the host's. Adapted by hand: the guard sits one level deeper on this branch, and the SVE benchmark fix does not apply because the INT8/UINT8 space benchmarks do not exist here. (cherry picked from commit e5784b1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 0.8 #1126 +/- ##
=======================================
Coverage 97.16% 97.16%
=======================================
Files 91 91
Lines 4896 4896
=======================================
Hits 4757 4757
Misses 139 139 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add Ubuntu 26.04 install script for the new ubuntu-latest runner GitHub's ubuntu-latest image moved to Ubuntu 26.04, and install_script.sh failed with "ubuntu_26.04.sh: No such file or directory". apt.llvm.org has no LLVM 18 repo for 26.04 (resolute), so install clang-format-18 from the Ubuntu archive and point the unversioned clang-format used by check-format.sh at it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 4d9e4d2)
|
CI status: |
Fix std::vector::swap assertion failure with GCC 15 GCC 15 (Fedora 43) auto-enables _GLIBCXX_ASSERTIONS in unoptimized builds (-O0). This activates a runtime check in std::vector::swap (stl_vector.h:1847) that requires either propagate_on_container_swap to be true_type, or the two allocators to compare equal. TieredHNSW_BatchIterator::getNextResults swaps result vectors across allocator boundaries: flat_results (management-layer allocator) is swapped with the VecSimQueryReply returned by the frontend BF index (frontend allocator), and similarly for hnsw_results. These allocators are distinct VecSimAllocator instances, so operator== returns false, triggering __glibcxx_assert_fail -> abort(). Adding propagate_on_container_swap = true_type to VecsimSTLAllocator is safe because all VecSimAllocator instances use the same underlying allocation functions — they differ only in memory-tracking bookkeeping, not in actual alloc/free behavior. (cherry picked from commit 5bcc53e)
ubuntu-latest now runs Ubuntu 26.04, whose archive ships clang-format 18, and it wants a space before the empty constructor body in three places.
|
After the installer fix, two more pre-existing failures surfaced on the 26.04 image, both unrelated to the binutils change: the sanitizer run aborts in |
Backport of #912 to 0.8 (hand-ported; the original does not cherry-pick cleanly).
Why now: RediSearchEnterprise snapshot builds for RSE 2.10 fail on the Ubuntu Focal x86_64 job (
Build + Pack (RoR)) withError: no such instruction: vfmadd231ph .... The job builds with a newer GCC inside the focal container, whose binutils is 2.34. GCC accepts-mavx512fp16, so CMake enables the FP16 kernels, but the assembler cannot emit them. RediSearch 2.10 pins VecSim 0.8, so the fix must land here before the Search pin can be bumped.What changes: the hardcoded Ubuntu 18.04 check in
cmake/x86_64InstructionFlags.cmakeis replaced by a binutils version check (CXX_AVX512BF16off below 2.34,CXX_AVX512FP16off below 2.38);src/VecSim/spaces/CMakeLists.txtgates onCMAKE_SYSTEM_PROCESSORinstead of the host's.Adapted for 0.8: the guard lives one level deeper in the flags file (inside the x86
if), so the hunk was re-indented. The SVE benchmark hunk is dropped becausebm_spaces_int8.cpp/bm_spaces_uint8.cppdo not exist on this branch.Validation: ran the cmake flags file under
cmake -Pwith a stubbed compiler check and a fakeasreporting a chosen version. FP16 and BF16 both off at 2.30; FP16 off, BF16 on at 2.34; both on at 2.38 and 2.42.Follow-up: bump
deps/VectorSimilarityon RediSearch 2.10, then RSE 2.10 picks it up via the daily bump.CI note: GitHub moved
ubuntu-latestto Ubuntu 26.04 (GCC 15, binutils 2.44, clang-format 18) and this branch's PR CI had not run on it before. The PR therefore also carries two CI-only cherry-picks from main, both unrelated to the binutils change:.install/ubuntu_26.04.sh(from Add Ubuntu 26.04 install script for the ubuntu-latest runner #1111). Without itbasic testsandsanitizerfailed in the install step; the same break closed [8.8] [MOD-18996] Transfer allocation accounting between allocators #1117 on 8.8.propagate_on_container_swaponVecsimSTLAllocator(MOD-14977, MOD-14977 Fix std::vector::swap assertion failure with GCC 15 #938). GCC 15 enables_GLIBCXX_ASSERTIONSat -O0 and the tiered batch-iterator tests abort instd::vector::swapwithout it.) {};instead of){};in three constructors.🤖 Generated with Claude Code