Skip to content

Commit d417f3e

Browse files
committed
Addressing Bot comments
1 parent e32e0b4 commit d417f3e

3 files changed

Lines changed: 14 additions & 27 deletions

File tree

.github/actions/build-package/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ runs:
8383
# Source gcc-toolset environment (version depends on distro)
8484
if [ -f /etc/profile.d/gcc-toolset-15.sh ]; then
8585
source /etc/profile.d/gcc-toolset-15.sh
86-
# Fallback for Rocky Linux 8/9
86+
elif [ -f /etc/profile.d/gcc-toolset-14.sh ]; then
87+
source /etc/profile.d/gcc-toolset-14.sh
8788
elif [ -f /etc/profile.d/gcc-toolset-13.sh ]; then
8889
source /etc/profile.d/gcc-toolset-13.sh
8990
fi
@@ -92,10 +93,10 @@ runs:
9293
export DISABLE_WERRORS=yes
9394
export BUILD_TLS=yes
9495
export USE_SYSTEMD=yes
95-
# Enable RediSearch LTO only where LLVM 21 is available (Rocky 10).
96-
# Rocky 8/9 lack libstdc++ with GLIBCXX_3.4.30+ that upstream LLVM 21
97-
# binaries require, so keep LTO=0 there.
98-
if [ -x /opt/llvm/bin/clang-21 ]; then
96+
# Enable RediSearch LTO only where our LLVM toolchain is installed.
97+
# Rocky 8 lacks a compatible libstdc++ runtime for the prebuilt LLVM
98+
# binaries so it has no /opt/llvm; Rocky 9 and 10 do.
99+
if [ -x /opt/llvm/bin/clang ]; then
99100
export LTO=1
100101
export PATH=/opt/llvm/bin:$PATH
101102
else

dockerfiles/Dockerfile.rockylinux9

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ RUN echo '[goreleaser]\nname=GoReleaser\nbaseurl=https://repo.goreleaser.com/yum
1010
xz \
1111
wget \
1212
which \
13-
gcc-toolset-13-gcc \
14-
gcc-toolset-13-gcc-c++ \
13+
gcc-toolset-14-gcc \
14+
gcc-toolset-14-gcc-c++ \
1515
clang \
1616
git \
1717
make \
@@ -32,29 +32,15 @@ RUN echo '[goreleaser]\nname=GoReleaser\nbaseurl=https://repo.goreleaser.com/yum
3232
# Python venv
3333
python3 -m venv /opt/venv; \
3434
\
35-
cp /opt/rh/gcc-toolset-13/enable /etc/profile.d/gcc-toolset-13.sh; \
36-
echo "source /etc/profile.d/gcc-toolset-13.sh" >> /etc/bashrc
35+
cp /opt/rh/gcc-toolset-14/enable /etc/profile.d/gcc-toolset-14.sh; \
36+
echo "source /etc/profile.d/gcc-toolset-14.sh" >> /etc/bashrc
3737

3838
# Install CMake
3939
COPY install/install_cmake.sh /tmp/
4040
RUN bash /tmp/install_cmake.sh
4141

42-
# Rocky 9's system libstdc++ (GCC 11, GLIBCXX_3.4.28) is too old for the
43-
# prebuilt LLVM 21 binaries (need 3.4.30+). Pull a newer libstdc++ from
44-
# Fedora 43 which provides GLIBCXX_3.4.34 and is built against a compatible
45-
RUN dnf install -y \
46-
--repofrompath=fedora,'https://dl.fedoraproject.org/pub/fedora/linux/releases/43/Everything/$basearch/os/' \
47-
--setopt=fedora.gpgcheck=0 \
48-
--disablerepo='*' --enablerepo=fedora \
49-
libstdc++ && \
50-
dnf clean all
51-
52-
# Install LLVM 21 for RediSearch LTO (Rocky 9 + Rocky 10; see install_llvm.sh).
53-
COPY install/install_llvm.sh /tmp/
54-
RUN bash /tmp/install_llvm.sh
55-
5642
# Set environment
57-
ENV PATH="/opt/llvm/bin:/usr/local/bin:/opt/venv/bin:${PATH}"
43+
ENV PATH="/usr/local/bin:/opt/venv/bin:${PATH}"
5844
WORKDIR /build
5945

6046
# Default command

install/install_llvm.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Install LLVM 21 for RediSearch's cross-language (C/Rust) LTO build.
33
# LLVM has no dnf repo, so we use the official upstream tarball.
44
#
5-
# Rocky 10 only: prebuilt LLVM 21 binaries need GLIBCXX_3.4.30+; Rocky 10
6-
# ships it (3.4.32). Rocky 8/9 don't — gcc-toolset ships compile-time headers
7-
# only, no newer libstdc++.so.6 runtime, so there is nothing to vendor.
5+
# Rocky 10 only: ships libstdc++ with GLIBCXX_3.4.32 which satisfies the
6+
# GLIBCXX_3.4.30+ requirement of the prebuilt LLVM 21 binaries.
7+
# Rocky 8 and Rocky 9 are not supported (incompatible libstdc++ at runtime).
88

99
set -euo pipefail
1010

0 commit comments

Comments
 (0)