Skip to content

Commit 4111984

Browse files
committed
debug
1 parent d1af426 commit 4111984

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.ci/scripts/wheel/pre_build_script.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ fi
4545

4646
"${GITHUB_WORKSPACE}/${REPOSITORY}/install_requirements.sh" --example
4747

48+
# Install glibc-2.29
49+
4850
echo "GCC version: $(gcc -dumpfullversion)"
4951

5052
GLIBC_VERSION=2.29
@@ -53,20 +55,27 @@ BUILD_DIR=/tmp/glibc-build
5355
TARBALL=/tmp/glibc-$GLIBC_VERSION.tar.xz
5456
SRC_DIR=/tmp/glibc-$GLIBC_VERSION
5557

58+
# Clean old dirs
5659
rm -rf "$PREFIX" "$BUILD_DIR" "$SRC_DIR" "$TARBALL"
5760
mkdir -p "$BUILD_DIR"
5861

59-
MIRROR=https://ftpmirror.gnu.org/gnu/libc
62+
# Download tarball from canonical GNU FTP (not ftpmirror)
63+
MIRROR=https://ftp.gnu.org/gnu/libc
6064
curl -L "$MIRROR/glibc-$GLIBC_VERSION.tar.xz" -o "$TARBALL"
6165

66+
# Sanity check tarball
67+
ls -lh "$TARBALL"
68+
file "$TARBALL" || true
69+
70+
# Extract
6271
tar -C /tmp -xf "$TARBALL"
6372

6473
cd "$BUILD_DIR"
6574

66-
# Unset to keep glibc configure happy
75+
# Unset LD_LIBRARY_PATH to satisfy glibc configure
6776
unset LD_LIBRARY_PATH
6877

69-
# Suppress warnings that GCC 13+ promotes to errors
78+
# Suppress GCC 13+ warnings that break glibc-2.29
7079
COMMON_FLAGS="-O2 -fPIC -fcommon \
7180
-Wno-error=array-parameter \
7281
-Wno-error=array-bounds \
@@ -81,12 +90,15 @@ COMMON_FLAGS="-O2 -fPIC -fcommon \
8190
export CFLAGS="$COMMON_FLAGS"
8291
export CPPFLAGS="$COMMON_FLAGS"
8392

93+
# Configure
8494
../glibc-$GLIBC_VERSION/configure \
8595
--prefix="$PREFIX" \
8696
--without-selinux
8797

98+
# Build and install
8899
make -j"$(nproc)"
89100
make install
90101

102+
# Check installed glibc
91103
"$PREFIX/lib/ld-2.29.so" --version || true
92104
"$PREFIX/lib/libc.so.6" --version || true

0 commit comments

Comments
 (0)