Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 19 additions & 33 deletions presto-native-execution/scripts/setup-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,34 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -e
set -x
set -eufx -o pipefail

# source the velox setup script first.
source "$(dirname "${BASH_SOURCE}")/../velox/scripts/setup-centos8.sh"
export FB_OS_VERSION=v2023.12.04.00
export RE2_VERSION=2021-04-01
export nproc=$(getconf _NPROCESSORS_ONLN)
export CC=/opt/rh/gcc-toolset-9/root/bin/gcc
export CXX=/opt/rh/gcc-toolset-9/root/bin/g++

dnf install -y maven java python3-devel clang-tools-extra jq perl-XML-XPath

python3 -m pip install regex pyyaml chevron black

export CC=/opt/rh/gcc-toolset-9/root/bin/gcc
export CXX=/opt/rh/gcc-toolset-9/root/bin/g++
function install_proxygen {
github_checkout facebook/proxygen "${FB_OS_VERSION}"
cmake_install -DBUILD_TESTS=OFF
}

function install_presto_deps {
install_velox_deps
run_and_time install_proxygen
}

CPU_TARGET="${CPU_TARGET:-avx}"
SCRIPT_DIR=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
if [ -f "${SCRIPT_DIR}/setup-helper-functions.sh" ]
then
source "${SCRIPT_DIR}/setup-helper-functions.sh"
if [[ $# -ne 0 ]]; then
for cmd in "$@"; do
run_and_time "${cmd}"
done
else
source "${SCRIPT_DIR}/../velox/scripts/setup-helper-functions.sh"
install_presto_deps
fi

export COMPILER_FLAGS=$(echo -n $(get_cxx_flags $CPU_TARGET))

(
wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz &&
tar xvfz gperf-3.1.tar.gz &&
cd gperf-3.1 &&
./configure --prefix=/usr/local/gperf/3_1 &&
make "-j$(nproc)" &&
make install &&
ln -s /usr/local/gperf/3_1/bin/gperf /usr/local/bin/
)


(
git clone https://github.com/facebook/proxygen &&
cd proxygen &&
git checkout $FB_OS_VERSION &&
cmake_install -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON
)


dnf clean all
2 changes: 0 additions & 2 deletions presto-native-execution/scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ set -eufx -o pipefail
# Run the velox setup script first.
source "$(dirname "${BASH_SOURCE}")/../velox/scripts/setup-macos.sh"

MACOS_DEPS="${MACOS_DEPS} bison gperf"
export FB_OS_VERSION=v2023.12.04.00

export PATH=$(brew --prefix bison)/bin:$PATH

function install_proxygen {
Expand Down
1 change: 0 additions & 1 deletion presto-native-execution/scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ set -eufx -o pipefail
# Run the velox setup script first.
source "$(dirname "${BASH_SOURCE}")/../velox/scripts/setup-ubuntu.sh"
export FB_OS_VERSION=v2023.12.04.00
sudo apt install -y gperf

function install_proxygen {
github_checkout facebook/proxygen "${FB_OS_VERSION}"
Expand Down