Skip to content

Commit

Permalink
Use AWS SDK C++ installed from vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 3, 2022
1 parent d100b39 commit da2798f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 46 deletions.
3 changes: 2 additions & 1 deletion ci/docker/python-wheel-manylinux-201x.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ RUN vcpkg install \
--x-feature=flight \
--x-feature=gcs \
--x-feature=json \
--x-feature=parquet
--x-feature=parquet \
--x-feature=s3

ARG python=3.8
ENV PYTHON_VERSION=${python}
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/python-wheel-windows-vs2017.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ RUN vcpkg install \
--x-feature=flight \
--x-feature=gcs \
--x-feature=json \
--x-feature=parquet
--x-feature=parquet \
--x-feature=s3

# Remove previous installations of python from the base image
# NOTE: a more recent base image (tried with 2.12.1) comes with python 3.9.7
Expand Down
1 change: 0 additions & 1 deletion ci/scripts/python_wheel_macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ cmake \
-DARROW_WITH_SNAPPY=${ARROW_WITH_SNAPPY} \
-DARROW_WITH_ZLIB=${ARROW_WITH_ZLIB} \
-DARROW_WITH_ZSTD=${ARROW_WITH_ZSTD} \
-DAWSSDK_SOURCE=BUNDLED \
-DCMAKE_APPLE_SILICON_PROCESSOR=arm64 \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_INSTALL_LIBDIR=lib \
Expand Down
1 change: 0 additions & 1 deletion ci/scripts/python_wheel_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ cmake \
-DARROW_WITH_SNAPPY=${ARROW_WITH_SNAPPY} \
-DARROW_WITH_ZLIB=${ARROW_WITH_ZLIB} \
-DARROW_WITH_ZSTD=${ARROW_WITH_ZSTD} \
-DAWSSDK_SOURCE=BUNDLED \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=/tmp/arrow-dist \
Expand Down
1 change: 0 additions & 1 deletion ci/scripts/python_wheel_windows_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ cmake ^
-DARROW_WITH_SNAPPY=%ARROW_WITH_SNAPPY% ^
-DARROW_WITH_ZLIB=%ARROW_WITH_ZLIB% ^
-DARROW_WITH_ZSTD=%ARROW_WITH_ZSTD% ^
-DAWSSDK_SOURCE=BUNDLED ^
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
-DCMAKE_CXX_COMPILER=clcache ^
-DCMAKE_INSTALL_PREFIX=C:\arrow-dist ^
Expand Down
38 changes: 0 additions & 38 deletions ci/vcpkg/ports.patch
Original file line number Diff line number Diff line change
Expand Up @@ -71,44 +71,6 @@ index 1289eed36a..b010a69f13 100644
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
diff --git a/ports/aws-sdk-cpp/fix-find-crypto.patch b/ports/aws-sdk-cpp/fix-find-crypto.patch
new file mode 100644
index 0000000000..aafc631e93
--- /dev/null
+++ b/ports/aws-sdk-cpp/fix-find-crypto.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/setup_cmake_find_module.cmake b/cmake/setup_cmake_find_module.cmake
+index f5f147a0f..4561b8c39 100644
+--- a/cmake/setup_cmake_find_module.cmake
++++ b/cmake/setup_cmake_find_module.cmake
+@@ -30,15 +30,6 @@ file(WRITE
+ "set(AWSSDK_INSTALL_BINDIR ${BINARY_DIRECTORY})\n"
+ "set(AWSSDK_INSTALL_INCLUDEDIR ${INCLUDE_DIRECTORY})\n"
+ "set(AWSSDK_INSTALL_ARCHIVEDIR ${ARCHIVE_DIRECTORY})\n"
+- "if (NOT LibCrypto_INCLUDE_DIR)\n"
+- " set(LibCrypto_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR} CACHE INTERNAL \"The OpenSSL include directory\")\n"
+- "endif()\n"
+- "if (NOT LibCrypto_STATIC_LIBRARY)\n"
+- " set(LibCrypto_STATIC_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE INTERNAL \"The OpenSSL crypto static library\")\n"
+- "endif()\n"
+- "if (NOT LibCrypto_SHARED_LIBRARY)\n"
+- " set(LibCrypto_SHARED_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE INTERNAL \"The OpenSSL crypto shared library\")\n"
+- "endif()\n"
+ )
+
+ if (NOT SIMPLE_INSTALL)
diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake
index b520a17ae3..ea9e770cf5 100644
--- a/ports/aws-sdk-cpp/portfile.cmake
+++ b/ports/aws-sdk-cpp/portfile.cmake
@@ -8,6 +8,7 @@ vcpkg_from_github(
PATCHES
patch-relocatable-rpath.patch
fix-aws-root.patch
+ fix-find-crypto.patch
)

string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT)
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index f81d0c491d..e5ea9cef57 100644
--- a/ports/curl/portfile.cmake
Expand Down
4 changes: 2 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4351,8 +4351,8 @@ macro(build_awssdk)
${EP_COMMON_CMAKE_ARGS}
-DBUILD_SHARED_LIBS=OFF
# Workaround for https://github.com/aws/aws-sdk-cpp/issues/1582
-DCMAKE_CXX_FLAGS="${EP_CXX_FLAGS} -Wno-error=deprecated-declarations"
-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}="${EP_CXX_FLAGS} -Wno-error=deprecated-declarations"
"-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS} -Wno-error=deprecated-declarations"
"-DCMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}=${EP_CXX_FLAGS} -Wno-error=deprecated-declarations"
-DCMAKE_BUILD_TYPE=${AWSSDK_BUILD_TYPE}
-DCMAKE_INSTALL_LIBDIR=${AWSSDK_LIB_DIR}
-DENABLE_TESTING=OFF
Expand Down
3 changes: 2 additions & 1 deletion dev/tasks/python-wheels/github.osx.amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ jobs:
--x-feature=flight \
--x-feature=gcs \
--x-feature=json \
--x-feature=parquet
--x-feature=parquet \
--x-feature=s3
- name: Install Python {{ python_version }}
shell: bash
Expand Down

0 comments on commit da2798f

Please sign in to comment.