From b85233929105ddc55f99466b4abb01f9fcfd3235 Mon Sep 17 00:00:00 2001 From: Dan Forsberg Date: Tue, 27 Oct 2020 15:06:01 +0000 Subject: [PATCH] amazon linux pre-reqs and CFLAG --- build/Makefile.linux | 2 +- make-linux | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build/Makefile.linux b/build/Makefile.linux index 829a9c7..a126ff5 100644 --- a/build/Makefile.linux +++ b/build/Makefile.linux @@ -6,7 +6,7 @@ SQLITE:=$(ROOT)/sqlite # Flags CXX = g++ OPTIMIZATIONS = -O3 -CFLAGS = -I $(SQLITE) $(OPTIMIZATIONS) -std=c++11 -Wall -fPIC -g +CFLAGS = $CFLAGS -I $(SQLITE) $(OPTIMIZATIONS) -std=c++11 -Wall -fPIC -g LIBS = -lparquet -lboost_regex -lboost_system -lboost_filesystem \ -lbrotlienc -lbrotlicommon -lbrotlidec -licui18n -licuuc -licudata \ -llz4 -lsnappy -lthrift -lz -lzstd -lcrypto -lssl diff --git a/make-linux b/make-linux index 0ac5ab4..1268102 100755 --- a/make-linux +++ b/make-linux @@ -5,7 +5,7 @@ apt install -y sudo lsb-release wget here=$(dirname "${BASH_SOURCE[0]}") here=$(readlink -f "$here") -ubuntu="$(lsb_release -s -r)" +distro="$(lsb_release -s -r)" setup_directories() { cd "$here" @@ -14,7 +14,17 @@ setup_directories() { cd build/linux } -install_prerequisites() { +install_prerequisites_amazon_linux() { + # Install Apache Arrow and dependencies. + sudo yum update -y + sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + sudo yum install -y https://apache.bintray.com/arrow/centos/7/apache-arrow-release-latest.rpm + sudo yum install -y --enablerepo=epel parquet-devel + sudo yum install -y lz4-devel thrift-devel libzstd-devel snappy-devel brotli-devel boost-devel boost-static libicu-devel openssl-devel + export CFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 +} + +install_prerequisites_ubuntu() { # install Apache Arrow libs # NOTE: Pinned to Ubuntu Focal wget https://apache.bintray.com/arrow/ubuntu/apache-arrow-archive-keyring-latest-focal.deb @@ -43,7 +53,7 @@ build_sqlite() { } set_icu_version() { - case "$ubuntu" in + case "$distro" in 14.04) export ICU_VERSION=52-1 ;;