From ead4f499cbe6f7409259274da4a7e2fff8aa83c8 Mon Sep 17 00:00:00 2001 From: Yangyang Gao Date: Wed, 22 Nov 2023 13:39:57 +0800 Subject: [PATCH] update azure sdk dependencies install sciprt --- CMakeLists.txt | 3 ++- scripts/setup-adapters.sh | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 603520e5fbcb..f647c00e1485 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,7 +222,8 @@ if(VELOX_ENABLE_ABFS) if(AZURESDK_ROOT_DIR) list(APPEND CMAKE_PREFIX_PATH ${AZURESDK_ROOT_DIR}) endif() - find_package(azure-storage-blobs-cpp CONFIG REQUIRED) + # files-datalake is built on blobs + find_package(azure-storage-files-datalake-cpp CONFIG REQUIRED) add_definitions(-DVELOX_ENABLE_ABFS) endif() diff --git a/scripts/setup-adapters.sh b/scripts/setup-adapters.sh index 5bc9c81e4605..b378437f47ec 100755 --- a/scripts/setup-adapters.sh +++ b/scripts/setup-adapters.sh @@ -62,7 +62,9 @@ function install_gcs-sdk-cpp { } function install_azure-storage-sdk-cpp { - github_checkout azure/azure-sdk-for-cpp azure-storage-blobs_12.8.0 + vcpkg_commit_id=7a6f366cefd27210f6a8309aed10c31104436509 + github_checkout azure/azure-sdk-for-cpp azure-storage-files-datalake_12.8.0 + sed -i "s/set(VCPKG_COMMIT_STRING .*)/set(VCPKG_COMMIT_STRING $vcpkg_commit_id)/" cmake-modules/AzureVcpkg.cmake cd sdk/core/azure-core if ! grep -q "baseline" vcpkg.json; then @@ -71,7 +73,7 @@ function install_azure-storage-sdk-cpp { if [[ "$openssl_version" == 1.1.1* ]]; then openssl_version="1.1.1n" fi - sed -i 's/"version-string"/"builtin-baseline": "dafef74af53669ef1cc9015f55e0ce809ead62aa","version-string"/' vcpkg.json + sed -i "s/\"version-string\"/\"builtin-baseline\": \"$vcpkg_commit_id\",\"version-string\"/" vcpkg.json sed -i "s/\"version-string\"/\"overrides\": [{ \"name\": \"openssl\", \"version-string\": \"$openssl_version\" }],\"version-string\"/" vcpkg.json fi cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF @@ -84,9 +86,11 @@ function install_azure-storage-sdk-cpp { cd - # install azure-storage-blobs cd sdk/storage/azure-storage-blobs - if ! grep -q "baseline" vcpkg.json; then - sed -i 's/"version-semver"/"builtin-baseline": "dafef74af53669ef1cc9015f55e0ce809ead62aa","version-semver"/' vcpkg.json - fi + cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF + + cd - + # install azure-storage-files-datalake + cd sdk/storage/azure-storage-files-datalake cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF }