-
Notifications
You must be signed in to change notification settings - Fork 165
Enable AWSSDK on Linux by statically linking OpenSSL and cURL #421
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
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ee30718
Debug
ejguan 7c76f64
Install OPENSSL
ejguan 62c1d50
Static OpenSSL
ejguan 16f8270
manylinux2014
ejguan 62d3163
Force linking static openssl
ejguan efb69ff
Debugging
ejguan b9f1fde
Install static curl
ejguan 077aa61
Remove duplicate sheel script
ejguan 7986bce
Update readme for releasing scripts
ejguan 8e61524
Remove debugging commits
ejguan 8bea4e7
Re-apply debug
ejguan c861d8b
Fix apple build
ejguan cf3e5a5
Link ZLIB
ejguan 49c47ff
Remove debugging commits
ejguan d2e9391
Fix merge conflict
ejguan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,6 @@ jobs: | |
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
with-s3: | ||
- 1 | ||
- 0 | ||
steps: | ||
- name: Setup additional system libraries | ||
if: startsWith( matrix.os, 'ubuntu' ) | ||
|
@@ -44,10 +41,10 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup msbuild on Windows | ||
if: matrix.with-s3 == 1 && matrix.os == 'windows-latest' | ||
if: matrix.os == 'windows-latest' | ||
uses: microsoft/[email protected] | ||
- name: Set up Visual Studio shell | ||
if: matrix.with-s3 == 1 && matrix.os == 'windows-latest' | ||
if: matrix.os == 'windows-latest' | ||
uses: egor-tensin/vs-shell@v2 | ||
with: | ||
arch: x64 | ||
|
@@ -65,7 +62,7 @@ jobs: | |
run: | | ||
python setup.py install | ||
env: | ||
BUILD_S3: ${{ matrix.with-s3 }} | ||
BUILD_S3: 1 | ||
- name: Install test requirements | ||
run: pip3 install -r test/requirements.txt | ||
- name: Run DataPipes tests with pytest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
OPENSSL_URL="https://www.openssl.org/source/" | ||
OPENSSL_NAME="openssl-1.1.1o" | ||
OPENSSL_SHA256="9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f" | ||
OPENSSL_BUILD_FLAGS="no-ssl2 no-zlib no-shared no-comp no-dynamic-engine enable-ec_nistp_64_gcc_128" | ||
|
||
CURL_URL="https://github.com/curl/curl/releases/download" | ||
CURL_NAME="curl-7.83.1" | ||
CURL_BUILD_FLAGS="--disable-shared" | ||
|
||
function check_sha256sum { | ||
local fname=$1 | ||
local sha256=$2 | ||
echo "${sha256} ${fname}" > ${fname}.sha256 | ||
sha256sum -c ${fname}.sha256 | ||
rm ${fname}.sha256 | ||
} | ||
|
||
yum erase -y openssl-devel curl-devel | ||
|
||
pushd ${WORKSPACE} | ||
|
||
# OpenSSL | ||
curl -fsSL -o ${OPENSSL_NAME}.tar.gz ${OPENSSL_URL}/${OPENSSL_NAME}.tar.gz | ||
check_sha256sum ${OPENSSL_NAME}.tar.gz ${OPENSSL_SHA256} | ||
tar zxf ${OPENSSL_NAME}.tar.gz | ||
|
||
pushd ${OPENSSL_NAME} | ||
|
||
./config $OPENSSL_BUILD_FLAGS --prefix=${WORKSPACE}/ssl --openssldir=${WORKSPACE}/ssl | ||
make -j4 > /dev/null | ||
# avoid installing the docs | ||
# https://github.com/openssl/openssl/issues/6685#issuecomment-403838728 | ||
make install_sw > /dev/null | ||
|
||
popd | ||
rm -rf ${OPENSSL_NAME} ${OPENSSL_NAME}.tar.gz | ||
|
||
# cURL | ||
curl -fsSL -o ${CURL_NAME}.tar.gz ${CURL_URL}/${CURL_NAME//./_}/${CURL_NAME}.tar.gz | ||
tar zxf ${CURL_NAME}.tar.gz | ||
|
||
pushd ${CURL_NAME} | ||
|
||
./configure ${CURL_BUILD_FLAGS} --with-openssl=${WORKSPACE}/ssl --prefix=${WORKSPACE}/curl | ||
make -j4 > /dev/null | ||
make install > /dev/null | ||
|
||
popd | ||
rm -rf ${CURL_NAME} ${CURL_NAME}.tar.gz | ||
|
||
popd |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any situation where we do not enable
BUILD_S3
?It looks like only when the setup is Windows with conda, why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For binary releases, it's just because there are too many Error that Idk how to solve with AWS enabled for conda on windows.
For CI testing, you can treat it as wheels, we could enable testing with awssdk.
Generally, the reason I think it makes sense to always enable AWSSDK in our testing CI is the >95% tests are the same with or without AWSSDK enabled.