Skip to content

Commit

Permalink
[DAPHNE-daphne-eu#767] libhdfs3 + dependencies
Browse files Browse the repository at this point in the history
This commit adds the necessary packages for the container scripts and code in the build script to build the dependencies for HDFS support.
  • Loading branch information
corepointer committed Sep 12, 2024
1 parent bf601f5 commit 62af883
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
32 changes: 28 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ if [ $WITH_DEPS -gt 0 ]; then
daphne_msg "No need to build Arrow again."
fi
#------------------------------------------------------------------------------
# spdlog
# #8.9 spdlog
#------------------------------------------------------------------------------
spdlogDirName="spdlog-$spdlogVersion"
spdlogArtifactFileName=$spdlogDirName.tar.gz
Expand All @@ -915,7 +915,7 @@ if [ $WITH_DEPS -gt 0 ]; then
daphne_msg "No need to build spdlog again."
fi
#------------------------------------------------------------------------------
# Eigen
# #8.10 Eigen
#------------------------------------------------------------------------------
eigenDirName="eigen-${eigenVersion}"
if ! is_dependency_downloaded "eigen_v${eigenVersion}"; then
Expand All @@ -933,9 +933,33 @@ if [ $WITH_DEPS -gt 0 ]; then
else
daphne_msg "No need to build eigen again."
fi

#------------------------------------------------------------------------------
# #8.9 Build MLIR
# #8.11 HAWQ (libhdfs3)
#------------------------------------------------------------------------------
hawqDirName="hawq-rel-v$hawqVersion"
hawqTarName="v${hawqVersion}.tar.gz"
hawqInstDirName=$installPrefix
if ! is_dependency_downloaded "hawq_v${hawqVersion}"; then
daphne_msg "Get HAWQ (libhdfs3) version ${hawqVersion}"
wget "https://github.com/apache/hawq/archive/refs/tags/rel/${hawqTarName}" \
-qO "${cacheDir}/${hawqTarName}"
tar -xf "$cacheDir/$hawqTarName" -C "$sourcePrefix"
daphne_msg "Applying 0005-libhdfs3-remove-gtest-dep.patch"
patch -Np1 -i "${patchDir}/0005-libhdfs3-remove-gtest-dep.patch" -d "$sourcePrefix/$hawqDirName"
daphne_msg "Applying 0006-libhdfs3-add-cstdint-include.patch"
patch -Np1 -i "${patchDir}/0006-libhdfs3-add-cstdint-include.patch" -d "$sourcePrefix/$hawqDirName"
dependency_download_success "hawq_v${hawqVersion}"
fi
if ! is_dependency_installed "hawq_v${hawqVersion}"; then
cmake -G Ninja -S "$sourcePrefix/$hawqDirName/depends/libhdfs3" -B "${buildPrefix}/${hawqDirName}" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$installPrefix"
cmake --build "${buildPrefix}/${hawqDirName}" --target install/strip
dependency_install_success "hawq_v${hawqVersion}"
else
daphne_msg "No need to build HAWQ (libhdfs3) again."
fi
#------------------------------------------------------------------------------
# #8.12 Build MLIR
#------------------------------------------------------------------------------
# We rarely need to build MLIR/LLVM, only during the first build of the
# prototype and after upgrades of the LLVM sub-module. To avoid unnecessary
Expand Down
2 changes: 1 addition & 1 deletion containers/daphne-deps.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ARG TZ
RUN apt-get -qq -y update && apt-get -y upgrade \
&& apt-get -y --no-install-recommends install \
ca-certificates file git openssh-client unzip wget tar \
libomp-dev libpfm4-dev libssl-dev libxml2-dev uuid-dev zlib1g-dev \
libgsasl-dev libkrb5-dev libomp-dev libpfm4-dev libssl-dev libxml2-dev uuid-dev zlib1g-dev \
build-essential clang gfortran lld llvm llvm-18-tools ninja-build openjdk-11-jdk-headless pkg-config python3 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime
Expand Down
2 changes: 1 addition & 1 deletion containers/daphne-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ARG DEBIAN_FRONTEND="noninteractive"
ARG TZ
RUN apt-get -qq -y update && apt-get -y upgrade && apt-get -y --no-install-recommends install \
ca-certificates file git openssh-client unzip wget tar \
libomp-dev libpfm4-dev libssl-dev libxml2-dev uuid-dev zlib1g-dev \
libomp-dev libpfm4-dev libssl-dev libxml2-dev uuid-dev zlib1g-dev libgsasl-dev libkrb5-dev \
build-essential clang gfortran lld llvm llvm-18-tools ninja-build openjdk-11-jdk-headless pkg-config python3-numpy python3-pandas \
vim nano rsync sudo iputils-ping virtualenv openssh-server iproute2 git htop gdb lldb lld gpg-agent net-tools \
software-properties-common ca-certificates file unzip wget tar zstd \
Expand Down
2 changes: 1 addition & 1 deletion containers/daphne.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ LABEL "org.opencontainers.image.version"="$TIMESTAMP"
LABEL "org.opencontainers.image.created"="${CREATION_DATE}"
LABEL "org.opencontainers.image.revision"="${GIT_HASH}"
RUN apt-get -qq -y update && apt-get -y upgrade && apt-get -y --no-install-recommends install \
libtinfo6 openssl zlib1g python3-numpy python3-pandas libxml2 \
libtinfo6 openssl zlib1g python3-numpy python3-pandas libxml2 libgsasl18 libkrb5-3 libuuid1 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=daphne-build $DAPHNE_DIR/bin/* /usr/local/bin
COPY --from=daphne-build $DAPHNE_DIR/lib/* /usr/local/lib
Expand Down
1 change: 1 addition & 0 deletions software-package-versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ openMPIVersion=4.1.5
papiVersion=7.0.1
spdlogVersion=1.11.0
ubuntuVersion=24.04
hawqVersion=3.0.0.0

0 comments on commit 62af883

Please sign in to comment.