forked from LLNL/UnifyFS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·114 lines (100 loc) · 2.83 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
#
# This is an easy-bake script to download and build all UnifyFS's dependencies.
#
ROOT="$(pwd)"
mkdir -p deps
mkdir -p install
INSTALL_DIR=$ROOT/install
cd deps
repos=( https://xgitlab.cels.anl.gov/sds/bmi.git
https://github.com/google/leveldb.git
https://github.com/LLNL/GOTCHA.git
https://github.com/pmodels/argobots.git
https://github.com/mercury-hpc/mercury.git
https://xgitlab.cels.anl.gov/sds/margo.git
https://github.com/dvidelabs/flatcc.git
)
for i in "${repos[@]}" ; do
# Get just the name of the project (like "mercury")
name=$(basename $i | sed 's/\.git//g')
if [ -d $name ] ; then
echo "$name already exists, skipping it"
else
if [ "$name" == "mercury" ] ; then
git clone --recurse-submodules $i
else
git clone $i
fi
fi
done
echo "### building bmi ###"
cd bmi
./prepare && ./configure --enable-shared --enable-bmi-only \
--prefix="$INSTALL_DIR"
make -j $(nproc) && make install
cd ..
echo "### building leveldb ###"
cd leveldb
git checkout 1.22
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
-DBUILD_SHARED_LIBS=yes ..
make -j $(nproc) && make install
cd ..
cd ..
echo "### building GOTCHA ###"
cd GOTCHA
# Unify won't build against latest GOTCHA, so use a known compatible version.
git checkout 0.0.2
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" ..
make -j $(nproc) && make install
cd ..
cd ..
echo "### building argobots ###"
cd argobots
./autogen.sh && CC=gcc ./configure --prefix="$INSTALL_DIR"
make -j $(nproc) && make install
cd ..
echo "### building mercury ###"
cd mercury
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
-DMERCURY_USE_BOOST_PP=ON \
-DMERCURY_USE_CHECKSUMS=ON \
-DMERCURY_USE_EAGER_BULK=ON \
-DMERCURY_USE_SYSTEM_MCHECKSUM=OFF \
-DNA_USE_BMI=ON \
-DMERCURY_USE_XDR=OFF \
-DBUILD_SHARED_LIBS=on ..
make -j $(nproc) && make install
cd ..
cd ..
echo "### building margo ###"
cd margo
git checkout v0.4.3
export PKG_CONFIG_PATH="$INSTALL_DIR/lib/pkgconfig"
./prepare.sh
./configure --prefix="$INSTALL_DIR"
make -j $(nproc) && make install
cd ..
echo "### building flatcc ###"
cd flatcc
# need -DBUILD_SHARED_LIBS=ye
mkdir -p build && cd build
cmake -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DFLATCC_INSTALL=on ..
make -j $(nproc) && make install
cd ..
cd ..
cd "$ROOT"
echo "*************************************************************************"
echo "Dependencies are all built. You can now build Unify with:"
echo ""
echo " export PKG_CONFIG_PATH=$INSTALL_DIR/lib/pkgconfig"
echo " ./autogen.sh && ./configure --with-leveldb=$INSTALL_DIR" \
"--with-gotcha=$INSTALL_DIR --with-flatcc=$INSTALL_DIR"
echo " make"
echo ""
echo "*************************************************************************"