Skip to content

Commit 8d8101c

Browse files
committed
debug
1 parent a6ecfad commit 8d8101c

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.ci/scripts/wheel/pre_build_script.sh

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,36 @@ fi
4545

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

48-
#!/usr/bin/env bash
49-
set -euxo pipefail
50-
51-
echo "GCC version:"
52-
gcc --version
48+
# Print GCC version (just the number)
49+
echo "GCC version: $(gcc -dumpfullversion)"
5350

51+
# Version / directories
5452
GLIBC_VERSION=2.29
5553
PREFIX=/tmp/glibc-$GLIBC_VERSION
5654
BUILD_DIR=/tmp/glibc-build
55+
TARBALL=/tmp/glibc-$GLIBC_VERSION.tar.xz
56+
SRC_DIR=/tmp/glibc-$GLIBC_VERSION
5757

58-
# Clean old dirs if they exist
59-
rm -rf "$PREFIX" "$BUILD_DIR"
58+
# Clean old dirs/files if they exist
59+
rm -rf "$PREFIX" "$BUILD_DIR" "$SRC_DIR" "$TARBALL"
6060
mkdir -p "$BUILD_DIR"
6161

62-
# Download
62+
# Download source tarball into /tmp
6363
MIRROR=https://ftpmirror.gnu.org/gnu/libc
64-
curl -L $MIRROR/glibc-$GLIBC_VERSION.tar.xz -o glibc-$GLIBC_VERSION.tar.xz
65-
# curl -sSL https://ftp.gnu.org/gnu/libc/glibc-$GLIBC_VERSION.tar.xz -o /tmp/glibc-$GLIBC_VERSION.tar.xz
66-
tar -C /tmp -xf /tmp/glibc-$GLIBC_VERSION.tar.xz
64+
curl -L "$MIRROR/glibc-$GLIBC_VERSION.tar.xz" -o "$TARBALL"
6765

68-
cd "$BUILD_DIR"
66+
# Extract into /tmp
67+
tar -C /tmp -xf "$TARBALL"
6968

7069
# Configure with relaxed flags
70+
cd "$BUILD_DIR"
7171
CFLAGS="-O2 -fPIC -fcommon -Wno-error=array-parameter -Wno-error=stringop-overflow -Wno-error" \
72-
../glibc-$GLIBC_VERSION/configure --prefix="$PREFIX"
72+
../glibc-$GLIBC_VERSION/configure --prefix="$PREFIX"
7373

74-
# Build
74+
# Build & install
7575
make -j"$(nproc)" CFLAGS="$CFLAGS"
76-
77-
# Install
7876
make install
7977

80-
# Check
78+
# Quick check
8179
"$PREFIX/lib/ld-2.29.so" --version || true
8280
"$PREFIX/lib/libc.so.6" --version || true

0 commit comments

Comments
 (0)