Skip to content

Commit

Permalink
fix adapters.sh and add Minio build
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Jan 25, 2024
1 parent 70b10de commit bc8f4c4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
11 changes: 6 additions & 5 deletions scripts/setup-adapters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ set -eufx -o pipefail
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source $SCRIPTDIR/setup-helper-functions.sh
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
CMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}"

function install_aws-sdk_deps {
local AWS_REPO_NAME="aws/aws-sdk-cpp"
local AWS_SDK_VERSION="1.11.169"

github_checkout $AWS_REPO_NAME $AWS_SDK_VERSION --depth 1 --recurse-submodules
cmake_install -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS:BOOL=OFF -DMINIMIZE_SIZE:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DBUILD_ONLY:STRING="s3;identity-management"
cmake_install -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS:BOOL=OFF -DMINIMIZE_SIZE:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DBUILD_ONLY:STRING="s3;identity-management"
# Dependencies for S3 testing
if [[ "$OSTYPE" == linux-gnu* ]]; then
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20220526054841.0.0.x86_64.rpm
Expand Down Expand Up @@ -83,22 +84,22 @@ function install_azure-storage-sdk-cpp {
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
cmake_install -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS=OFF

cd -
# install azure-storage-common
cd sdk/storage/azure-storage-common
cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
cmake_install -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS=OFF

cd -
# install azure-storage-blobs
cd sdk/storage/azure-storage-blobs
cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
cmake_install -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -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
cmake_install -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS=OFF
}

function install_hdfs_deps {
Expand Down
23 changes: 22 additions & 1 deletion scripts/setup-centos8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ NPROC=$(getconf _NPROCESSORS_ONLN)
export CFLAGS=$(get_cxx_flags $CPU_TARGET) # Used by LZO.
export CXXFLAGS=$CFLAGS # Used by boost.
export CPPFLAGS=$CFLAGS # Used by LZO.
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
CMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}"
BUILD_DUCKDB="${BUILD_DUCKDB:-true}"

function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
Expand Down Expand Up @@ -113,4 +114,24 @@ cmake_install mvfst -DBUILD_TESTS=OFF
cmake_install fbthrift -Denable_tests=OFF
# cmake_install ranges-v3

if $BUILD_DUCKDB ; then
echo 'Building DuckDB'
mkdir ~/duckdb-install && cd ~/duckdb-install
wget https://github.com/duckdb/duckdb/archive/refs/tags/v0.8.1.tar.gz
tar -xf v0.8.1.tar.gz
cd duckdb-0.8.1
mkdir build && cd build
CMAKE_FLAGS=(
"-DBUILD_UNITTESTS=OFF"
"-DENABLE_SANITIZER=OFF"
"-DENABLE_UBSAN=OFF"
"-DBUILD_SHELL=OFF"
"-DEXPORT_DLL_SYMBOLS=OFF"
"-DCMAKE_BUILD_TYPE=Release"
)
cmake ${CMAKE_FLAGS[*]} ..
make install -j 16
rm -rf ~/duckdb-install
fi

dnf clean all

0 comments on commit bc8f4c4

Please sign in to comment.