Skip to content

Commit 159a775

Browse files
committed
use gcc 11
1 parent 65889b8 commit 159a775

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.ci/scripts/wheel/pre_build_script.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ fi
4747

4848
# Install glibc-2.34
4949

50-
# Install older GCC (works on GitHub Ubuntu runners)
51-
apt-get update
52-
apt-get install -y gcc-11 g++-11
53-
54-
# Force glibc build to use GCC 11
55-
export CC=gcc-11
56-
export CXX=g++-11
50+
# Prefer older GCC to avoid glibc build errors
51+
if [ -f /opt/rh/devtoolset-9/enable ]; then
52+
echo ">>> Enabling devtoolset-9 (GCC 9)"
53+
source /opt/rh/devtoolset-9/enable
54+
elif [ -f /opt/rh/devtoolset-8/enable ]; then
55+
echo ">>> Enabling devtoolset-8 (GCC 8)"
56+
source /opt/rh/devtoolset-8/enable
57+
fi
5758

58-
echo "GCC version (system default): $(gcc -dumpfullversion)"
59-
echo "GCC version (forced CC): $($CC -dumpfullversion)"
59+
echo "GCC version: $(gcc -dumpfullversion)"
6060

6161
# 👇 only change this line to bump version
6262
GLIBC_VERSION=2.34

0 commit comments

Comments
 (0)