Skip to content

Commit

Permalink
build: install zlib from alpine packages (#5317)
Browse files Browse the repository at this point in the history
  • Loading branch information
harryzcy committed Feb 29, 2024
1 parent e0fc164 commit 1eea612
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions scripts/install-glibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@

set -euo pipefail

case $TARGETARCH in
amd64)
target=x86_64
;;
arm64)
target=arm64
;;
*)
echo "$TARGETARCH is not supported"
exit 1
;;
esac

url=$(
set -euo pipefail
curl -s \
Expand All @@ -31,14 +18,9 @@ apk add --no-cache --force-overwrite "glibc-${GLIBC_VERSION}.apk"
rm "glibc-${GLIBC_VERSION}.apk"

# Install zlib
mkdir /tmp/libz

apk add --no-cache --virtual .glibc-build-deps \
tar \
zlib \
zstd

curl --retry 5 --retry-delay 5 -sL https://www.archlinux.org/packages/core/${target}/zlib/download | tar -x --zstd -C /tmp/libz
mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib
rm -rf /tmp/libz

apk del --no-network --purge .glibc-build-deps

0 comments on commit 1eea612

Please sign in to comment.