-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstal.sh
142 lines (118 loc) · 4.21 KB
/
instal.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/bin/bash
# by default, build/install everything in the current directory
# ROOT_DIR=$PWD
# if [ "$1" == "-h" ]; then
# echo "Usage: `basename $0` [absolute/path/to/build_and_install/dir/]"
# exit 0
# fi
# if [ $# -ne 0 ]; then
# if [[ "$1" = /* ]]; then
# # you can also pass a prefix
# ROOT_DIR=$1
# else
# echo "Build and installation directory must be an absolute path"
# exit 0
# fi
# fi
# ROOT_INSTALL_DIR=$ROOT_DIR/install
# mkdir -p $ROOT_INSTALL_DIR
# #libbacktrace
# LIBBACKTRACE_ROOT=$ROOT_DIR/libbacktrace
# LIBBACKTRACE_INSTALL_ROOT=$ROOT_INSTALL_DIR/libbacktrace
# if ! [ -d $LIBBACKTRACE_INSTALL_ROOT ]; then
# echo "Installing libbacktrace..."
# rm -rf $LIBBACKTRACE_ROOT
# git clone https://github.com/ianlancetaylor/libbacktrace.git $LIBBACKTRACE_ROOT|| exit 1
# cd $LIBBACKTRACE_ROOT || exit 1
# # any version should work, but to be sure, specify a revision that was tested
# git checkout 177940370e4a6b2509e92a0aaa9749184e64af43 || exit 1
# ./configure --prefix=$LIBBACKTRACE_INSTALL_ROOT || exit 1
# make -j4 install|| exit 1
# else
# echo "libbacktrace is already installed"
# fi
# #libpfm
# PFM_ROOT=$ROOT_DIR/libpfm
# PFM_INSTALL_ROOT=$ROOT_INSTALL_DIR/libpfm
# if ! [ -d $PFM_INSTALL_ROOT ]; then
# echo "Installing libpfm..."
# rm -rf $PFM_ROOT
# git clone https://git.code.sf.net/p/perfmon2/libpfm4 $PFM_ROOT || exit 1
# cd $PFM_ROOT || exit 1
# make PREFIX=$PFM_INSTALL_ROOT -j4 install || exit 1
# else
# echo "libpfm is already installed"
# fi
# #numactl-2.0.12
# NUMACTL_VERSION=2.0.12
# NUMACTL_ROOT=$ROOT_DIR/numactl-${NUMACTL_VERSION}
# NUMACTL_INSTALL_ROOT=$ROOT_INSTALL_DIR/numactl-${NUMACTL_VERSION}
# if ! [ -d $NUMACTL_INSTALL_ROOT ]; then
# echo "Installing numactl..."
# rm -rf $NUMACTL_ROOT || exit 1
# git clone https://github.com/numactl/numactl.git $NUMACTL_ROOT || exit 1
# cd $NUMACTL_ROOT || exit 1
# git checkout v${NUMACTL_VERSION} || exit 1
# ./autogen.sh || exit 1
# mkdir build || exit 1
# cd build
# ../configure --prefix=$NUMACTL_INSTALL_ROOT || exit 1
# make || exit 1
# make install || exit 1
# else
# echo "numactl is already installed"
# fi
# #libelf
# LIBELF_ROOT=$ROOT_DIR/libelf
# LIBELF_INSTALL_ROOT=$ROOT_INSTALL_DIR/libelf
# if ! [ -d $LIBELF_INSTALL_ROOT ]; then
# echo "Installing libelf..."
# rm -rf $LIBELF_ROOT || exit 1
# cd $ROOT_DIR
# wget https://sourceware.org/elfutils/ftp/0.186/elfutils-0.186.tar.bz2 || exit 1
# tar xjf elfutils-0.186.tar.bz2 || exit 1
# mv elfutils-0.186 $LIBELF_ROOT || exit 1
# cd $LIBELF_ROOT || exit 1
# mkdir build || exit 1
# cd build
# ../configure --prefix=$LIBELF_INSTALL_ROOT --disable-debuginfod || exit 1
# make || exit 1
# make install || exit 1
# else
# echo "libelf is already installed"
# fi
#numap
NUMAP_ROOT=$ROOT_DIR/numap
NUMAP_INSTALL_ROOT=$ROOT_INSTALL_DIR/numap
# if ! [ -d $NUMAP_INSTALL_ROOT ]; then
# echo "Installing numap..."
# rm -rf $NUMAP_ROOT || exit 1
# git clone https://github.com/numap-library/numap.git $NUMAP_ROOT || exit 1
# cd $NUMAP_ROOT || exit 1
# mkdir build || exit 1
# cd build
# cmake -DCMAKE_INSTALL_PREFIX=$NUMAP_INSTALL_ROOT -DPFM_DIR=$PFM_INSTALL_ROOT -DNUMACTL_DIR=$NUMACTL_INSTALL_ROOT $NUMAP_ROOT || exit 1
# make || exit 1
# make install || exit 1
# else
# echo "numap is already installed"
# fi
ROOT_DIR=$PWD
ROOT_INSTALL_DIR=$ROOT_DIR/install
#numamma
NUMAMMA_ROOT=$ROOT_DIR/numamma
NUMAMMA_INSTALL_ROOT=$ROOT_INSTALL_DIR/numamma
# if ! [ -d $NUMAMMA_INSTALL_ROOT ]; then
echo "Installing numamma..."
# rm -rf $NUMAMMA_ROOT || exit 1
# git clone https://github.com/numamma/numamma.git $NUMAMMA_ROOT || exit 1
cd $NUMAMMA_ROOT || exit 1
# mkdir build || exit 1
cd build || exit 1
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$NUMAP_INSTALL_ROOT/lib/pkgconfig
cmake -DCMAKE_INSTALL_PREFIX=$NUMAMMA_INSTALL_ROOT -DBACKTRACE_DIR=$LIBBACKTRACE_INSTALL_ROOT -DNUMACTL_DIR=$NUMACTL_INSTALL_ROOT -DLIBELF_DIR=$LIBELF_INSTALL_ROOT -DPFM_DIR=$PFM_INSTALL_ROOT $NUMAMMA_ROOT || exit 1
make || exit 1
make install || exit 1
# else
# echo "numamma is already installed"
# fi