Skip to content

Commit facfc44

Browse files
author
Dan Forsberg
committed
update make-linux
1 parent a30c631 commit facfc44

1 file changed

Lines changed: 13 additions & 44 deletions

File tree

make-linux

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
apt install -y sudo lsb-release wget
5+
46
here=$(dirname "${BASH_SOURCE[0]}")
57
here=$(readlink -f "$here")
6-
prebuilt="$here"/build/linux/prebuilt
78
ubuntu="$(lsb_release -s -r)"
8-
libs=(libarrow.a libboost_filesystem.a libboost_regex.a libboost_system.a libbrotlicommon.a libbrotlidec.a \
9-
libbrotlienc.a libicudata.a libicui18n.a libicuuc.a liblz4.a libparquet.a libsnappy.a libthrift.a libzstd.a)
10-
lib_locs=()
119

1210
setup_directories() {
1311
cd "$here"
1412
mkdir -p build/linux
15-
mkdir -p "$prebuilt"
1613
cp -f build/Makefile.linux build/linux/Makefile
1714
cd build/linux
1815
}
1916

2017
install_prerequisites() {
18+
# install Apache Arrow libs
19+
# NOTE: Pinned to Ubuntu Focal
20+
wget https://apache.bintray.com/arrow/ubuntu/apache-arrow-archive-keyring-latest-focal.deb
21+
sudo apt install -y -V ./apache-arrow-archive-keyring-latest-focal.deb
22+
sudo apt update -y
23+
sudo apt install -y -V libparquet-dev liblz4-dev libzstd-dev libthrift-dev \
24+
libsnappy-dev libthrift-dev libbrotli-dev libz-dev
25+
2126
# Install prereqs based on https://github.com/apache/parquet-cpp#linux
22-
sudo apt-get install libboost-dev g++ libboost-filesystem-dev \
27+
sudo apt install -y libboost-dev g++ libboost-filesystem-dev \
2328
libboost-program-options-dev libboost-regex-dev \
2429
libboost-system-dev libboost-test-dev \
2530
libssl-dev libtool bison flex pkg-config libreadline-dev libncurses-dev
2631

2732
# Install prereqs based on https://github.com/apache/arrow/tree/master/cpp
28-
sudo apt-get install cmake \
33+
sudo apt install -y cmake \
2934
libboost-dev \
3035
libboost-filesystem-dev \
3136
libboost-system-dev
@@ -59,47 +64,11 @@ set_icu_version() {
5964
export ICU_VERSION_U=${ICU_VERSION//-/_}
6065
}
6166

62-
add_prebuilt_lib() {
63-
lib_locs+=("$1=$prebuilt/$2.a")
64-
}
65-
66-
fetch_prebuilt_libs() {
67-
if [ ! -e "$prebuilt"/complete ]; then
68-
(
69-
cd "$prebuilt"
70-
curl "https://s3.amazonaws.com/cldellow/public/libparquet/$ubuntu/libs.tar.xz" > libs.tar.xz
71-
tar xf libs.tar.xz --xform 's#.*/##'
72-
touch "$prebuilt"/complete
73-
)
74-
fi
75-
76-
if [ ! -e "$here"/sqlite/sqlite3 ]; then
77-
ln -s "$prebuilt"/sqlite3 "$here"/sqlite/sqlite3
78-
fi
79-
80-
add_prebuilt_lib "PARQUET_CPP_LIB" libparquet
81-
add_prebuilt_lib "LZ4_LIB" liblz4
82-
add_prebuilt_lib "ZSTD_LIB" libzstd
83-
add_prebuilt_lib "THRIFT_LIB" libthrift
84-
add_prebuilt_lib "SNAPPY_LIB" libsnappy
85-
add_prebuilt_lib "ARROW_LIB" libarrow
86-
add_prebuilt_lib "ICU_I18N_LIB" libicui18n
87-
add_prebuilt_lib "ICU_UC_LIB" libicuuc
88-
add_prebuilt_lib "ICU_DATA_LIB" libicudata
89-
add_prebuilt_lib "BROTLI_ENC_LIB" libbrotlienc
90-
add_prebuilt_lib "BROTLI_COMMON_LIB" libbrotlicommon
91-
add_prebuilt_lib "BROTLI_DEC_LIB" libbrotlidec
92-
add_prebuilt_lib "BOOST_REGEX_LIB" libboost_regex
93-
add_prebuilt_lib "BOOST_SYSTEM_LIB" libboost_system
94-
add_prebuilt_lib "BOOST_FILESYSTEM_LIB" libboost_filesystem
95-
96-
}
97-
9867
main() {
68+
set_icu_version
9969
setup_directories
10070
install_prerequisites
10171
build_sqlite
102-
set_icu_version
10372

10473
if [ -v PREBUILT ]; then
10574
fetch_prebuilt_libs

0 commit comments

Comments
 (0)