fix: ensure requirements check works for libc development versions (#202660)

pull/202666/head
Robo 2024-01-17 20:18:31 +09:00 committed by GitHub
parent efc4fc231c
commit 7fd2edcf46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -83,10 +83,10 @@ if [ -n "$(ldd --version | grep -v musl)" ]; then
libc_real_path=$(readlink -f "$libc_path")
if [ -x "$libc_real_path" ]; then
# get version from executable
libc_version=$($libc_real_path --version | sed -n 's/.*stable release version \([0-9]\+\.[0-9]\+\).*/\1/p')
libc_version=$($libc_real_path --version | sed -n 's/.*release version \([0-9]\+\.[0-9]\+\).*/\1/p')
else
# .so is not executable on this host; try getting from strings
libc_version=$(cat "$libc_real_path" | sed -n 's/.*stable release version \([0-9]\+\.[0-9]\+\).*/\1/p')
libc_version=$(cat "$libc_real_path" | sed -n 's/.*release version \([0-9]\+\.[0-9]\+\).*/\1/p')
fi
if [ "$(printf '%s\n' "2.28" "$libc_version" | sort -V | head -n1)" = "2.28" ]; then
found_required_glibc=1