4545
4646" ${GITHUB_WORKSPACE} /${REPOSITORY} /install_requirements.sh" --example
4747
48+ # Install glibc-2.29
49+
4850echo " GCC version: $( gcc -dumpfullversion) "
4951
5052GLIBC_VERSION=2.29
@@ -53,20 +55,27 @@ BUILD_DIR=/tmp/glibc-build
5355TARBALL=/tmp/glibc-$GLIBC_VERSION .tar.xz
5456SRC_DIR=/tmp/glibc-$GLIBC_VERSION
5557
58+ # Clean old dirs
5659rm -rf " $PREFIX " " $BUILD_DIR " " $SRC_DIR " " $TARBALL "
5760mkdir -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
6064curl -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
6271tar -C /tmp -xf " $TARBALL "
6372
6473cd " $BUILD_DIR "
6574
66- # Unset to keep glibc configure happy
75+ # Unset LD_LIBRARY_PATH to satisfy glibc configure
6776unset LD_LIBRARY_PATH
6877
69- # Suppress warnings that GCC 13+ promotes to errors
78+ # Suppress GCC 13+ warnings that break glibc-2.29
7079COMMON_FLAGS=" -O2 -fPIC -fcommon \
7180 -Wno-error=array-parameter \
7281 -Wno-error=array-bounds \
@@ -81,12 +90,15 @@ COMMON_FLAGS="-O2 -fPIC -fcommon \
8190export CFLAGS=" $COMMON_FLAGS "
8291export CPPFLAGS=" $COMMON_FLAGS "
8392
93+ # Configure
8494../glibc-$GLIBC_VERSION /configure \
8595 --prefix=" $PREFIX " \
8696 --without-selinux
8797
98+ # Build and install
8899make -j" $( nproc) "
89100make 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