forked from inducer/islpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-with-barvinok.sh
executable file
·60 lines (49 loc) · 1.28 KB
/
build-with-barvinok.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
#! /bin/bash
set -e
set -x
BUILD_DIR=$(mktemp -d -t islpy-barvinok-build-XXXXXXX)
echo "BUILDING IN $BUILD_DIR"
PREFIX="$HOME/pack/barvinok"
NTL_VER="10.5.0"
BARVINOK_GIT_REV="barvinok-0.41.1"
NPROCS=30
if true; then
rm -Rf "$BUILD_DIR"
mkdir "$BUILD_DIR"
cd "$BUILD_DIR"
curl -L -O http://shoup.net/ntl/ntl-"$NTL_VER".tar.gz
tar xfz ntl-"$NTL_VER".tar.gz
cd "$BUILD_DIR/ntl-$NTL_VER/src"
./configure NTL_GMP_LIP=on PREFIX="$PREFIX" TUNE=x86 SHARED=on
make -j$NPROCS
make install
cd "$BUILD_DIR"
rm -Rf barvinok
git clone git://repo.or.cz/barvinok.git
cd barvinok
git checkout $BARVINOK_GIT_REV
numtries=1
while ! ./get_submodules.sh; do
sleep 5
numtries=$((numtries+1))
if test "$numtries" == 5; then
echo "*** getting barvinok submodules failed even after a few tries"
exit 1
fi
done
sh autogen.sh
./configure --prefix="$PREFIX" --with-ntl-prefix="$PREFIX" --enable-shared-barvinok --with-pet=bundled
make -j$NPROCS
make install
fi
cd "$BUILD_DIR"
rm -Rf islpy
git clone --recursive https://github.com/inducer/islpy
cd islpy
./configure.py \
--no-use-shipped-isl \
--no-use-shipped-imath \
--isl-inc-dir=$PREFIX/include \
--isl-lib-dir=$PREFIX/lib \
--use-barvinok
CC=g++ LDSHARED="g++ -shared" python setup.py install