Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[manylinux2010] Build a libcrypt.so.1 that suitable for grafting #581

Merged
merged 1 commit into from
May 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/build_scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ cd ..
rm -rf $SQLITE_AUTOCONF_VERSION*
rm /usr/local/lib/libsqlite3.a

# Install libcrypt.so.2
# Install libcrypt.so.1 and libcrypt.so.2
build_libxcrypt "$LIBXCRYPT_DOWNLOAD_URL" "$LIBXCRYPT_VERSION" "$LIBXCRYPT_HASH"

# Compile the latest Python releases.
Expand Down
20 changes: 16 additions & 4 deletions docker/build_scripts/build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,28 @@ function build_libxcrypt {
curl -fsSLO "$LIBXCRYPT_DOWNLOAD_URL"/v"$LIBXCRYPT_VERSION"
check_sha256sum "v$LIBXCRYPT_VERSION" "$LIBXCRYPT_HASH"
tar xfz "v$LIBXCRYPT_VERSION"
(cd "libxcrypt-$LIBXCRYPT_VERSION" && ./autogen.sh && \
do_standard_install \
pushd "libxcrypt-$LIBXCRYPT_VERSION"
./autogen.sh > /dev/null
do_standard_install \
--disable-obsolete-api \
--enable-hashes=all \
--disable-werror)
--disable-werror
# we also need libcrypt.so.1 with glibc compatibility for system libraries
# c.f https://github.com/pypa/manylinux/issues/305#issuecomment-625902928
make clean > /dev/null
sed -r -i 's/XCRYPT_([0-9.])+/-/g;s/(%chain OW_CRYPT_1.0).*/\1/g' lib/libcrypt.map.in
DESTDIR=$(pwd)/so.1 do_standard_install \
--disable-xcrypt-compat-files \
--enable-obsolete-api=glibc \
--enable-hashes=all \
--disable-werror
cp -P ./so.1/usr/local/lib/libcrypt.so.1* /usr/local/lib/
popd
rm -rf "v$LIBXCRYPT_VERSION" "libxcrypt-$LIBXCRYPT_VERSION"

# Delete GLIBC version headers and libraries
rm -rf /usr/include/crypt.h
rm -rf /usr/lib64/libcrypt.a /usr/lib64/libcrypt.so
rm -rf /usr/lib*/libcrypt.a /usr/lib*/libcrypt.so /usr/lib*/libcrypt.so.1
}

function build_patchelf {
Expand Down