-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL.txt
103 lines (69 loc) · 2.94 KB
/
INSTALL.txt
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
# This file can be directly executed !
# On a new machine
# If c++14 required, then install g++-5
# this is NOT NEEDED ANYMORE
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test
# sudo apt-get update
# sudo apt-get install -y gcc-5 g++-5
# sudo update-alternatives --remove-all gcc
# sudo update-alternatives --remove-all g++
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
# sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
# sudo update-alternatives --config gcc
# sudo update-alternatives --config g++
sudo apt-get install -y cmake git xfsprogs sysstat gdb
###############################################
# The rest is for any machine
# Packages to install
# XIO used by networkxio
wget http://apt.openvstorage.org/pool/main/a/accelio/libxio0_1.7-1_amd64.deb
sudo dpkg -i libxio0_1.7-1_amd64.deb
wget http://apt.openvstorage.org/pool/main/a/accelio/libxio-dev_1.7-1_amd64.deb
sudo dpkg -i libxio-dev_1.7-1_amd64.deb
# not using glog anymore, and its dependent unwind lib
# sudo apt-get install libunwind8-dev
# sudo apt-get install -y libgoogle-glog-dev
sudo apt-get install -y libaio1 libaio1-dbg libaio-dev
sudo apt-get install -y libz-dev libbz2-dev
# install boost1.57 specifically (this is how ovs does it)
echo "deb http://ppa.launchpad.net/afrank/boost/ubuntu trusty main" > /etc/apt/sources.list.d/boost_repo.list
echo "deb-src http://ppa.launchpad.net/afrank/boost/ubuntu trusty main" > /etc/apt/sources.list.d/boost_src_repo.list
sudo apt-get update
sudo apt-get install libboost1.57-all-dev libboost1.57-all
# Install google test
cd ~
git clone https://github.com/google/googletest
(cd googletest; mkdir build; cd build; cmake ..; sudo make install)
cd -
#========================
# Build gobjfs
(cd gobjfs; mkdir build; cd build; cmake ..; make)
#========================
# To install the libraries and headers in /usr/local
make install
# Under the install path, you should see "include" and "lib" directories
# To change the default installation path
# https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html
make DESTDIR=/home/less install
#========================
# To run clang static analyzer
sudo apt-add-repository "deb http://llvm.org/apt/trusty/llvm-toolchain-trusty-3.8 main"
sudo apt-get update
sudo apt-get install -y clang-3.8 lldb-3.8
#(cd gobjfs; cd build; \
#cmake -DCMAKE_C_COMPILER=/usr/lib/llvm-3.8/libexec/ccc-analyzer \
#-DCMAKE_CXX_COMPILER=/usr/lib/llvm-3.8/libexec/c++-analyzer ..; \
#scan-build make)
#=========================
To run address sanitizer
#(cd gobjfs; cd build; cmake -DCMAKE_BUILD_TYPE=ASan ..; make)
#=========================
To run cppcheck
sudo apt-get install -y cppcheck
(cd gobjfs; cd build; make cppcheck)
#========================
To run clang-format
sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
sudo apt-get update
sudo apt-get install -y clang-format-3.8
(cd gobjfs; cd build; make clangformat)