Skip to content

Commit 1e3c2c7

Browse files
committed
update bootstrap.sh
1 parent e581149 commit 1e3c2c7

4 files changed

Lines changed: 59 additions & 56 deletions

File tree

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ bin/*
66
# build directory for cmake
77
build/
88

9+
# LLVM project
10+
llvm-project/*
11+
12+
# Boost
13+
boost_1_66_0.tar.gz
14+
boost_1_66_0/*
15+
916
# external git submodules
1017
external/*
1118

README.md

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -57,35 +57,13 @@ the future and give us clues about our user base. Thank you very much!
5757

5858
Installation
5959
------------
60-
The installation of Phasar is not trivial, since it has some library
61-
dependencies. The libraries needed in order to be able to compile and run
62-
Phasar successfully are the following.
60+
Phasar can be installed using the installer scripts as explained in the following.
6361

64-
In the following the authors assume that a Unix-like system is used.
65-
Installation guides for the libraries can be found here:
62+
### Installing Phasar on an Ubuntu system
63+
In the following, we would like to give an complete example of how to install
64+
Phasar using an Ubuntu or Unix-like system.
6665

67-
[LLVM / Clang](http://apt.llvm.org/)
68-
69-
[BOOST](http://www.boost.org/doc/libs/1_66_0/more/getting_started/unix-variants.html)
70-
71-
[SQLITE3](https://www.sqlite.org/download.html)
72-
73-
[PYTHON](https://www.python.org/)
74-
75-
[ZLIB](https://zlib.net/) - a lossless data-compresion library
76-
77-
[LIBCURSES](http://www.gnu.org/software/ncurses/ncurses.html) - a terminal control library for constructing text user interfaces.
78-
79-
[Doxygen](www.doxygen.org)
80-
81-
[Graphviz](www.graphviz.org)
82-
83-
84-
### Brief example using an Ubuntu system
85-
In the following we would like to give an complete example of how to install
86-
Phasar using an Ubuntu (16.04) or Unix-like system.
87-
88-
For this we provide an installation script. To install phasar, just navigate to the top-level
66+
Therefore, we provide an installation script. To install Phasar, just navigate to the top-level
8967
directory of PhASAR and use the following command:
9068
```
9169
$ sudo ./bootstrap.sh
@@ -94,8 +72,8 @@ $ sudo ./bootstrap.sh
9472
Done!
9573

9674

97-
### Brief example using a MacOS system
98-
Mac OS 10.13.1 or higher only !
75+
### Installing Phasar a MacOS system
76+
Mac OS 10.13.1 or higher only!
9977
To install the framework on a Mac we will rely on Homebrew. (https://brew.sh/)
10078

10179
The needed packages are
@@ -106,7 +84,11 @@ $ brew install python3
10684

10785
**To be continued.**
10886

109-
### Compile Phasar
87+
### Installing Phasar on a Windows system
88+
89+
**A solution is under implementation.**
90+
91+
### Compiling Phasar (if not already done using the installation scripts)
11092
Set the system's variables for the C and C++ compiler to clang:
11193
```
11294
$ export CC=/usr/local/bin/clang
@@ -132,10 +114,11 @@ $ mkdir build
132114
$ cd build/
133115
$ cmake -DCMAKE_BUILD_TYPE=Release ..
134116
$ make -j $(nproc) # or use a different number of cores to compile it
117+
$ sudo make install # if you wish to install Phasar system wide
135118
```
136119

137-
When you have used the script `bootstrap.sh` for installing phasar, the above steps are already done.
138-
Use them as a reference if you want to modify PhASAR and recompile it.
120+
When you have used the `bootstrap.sh` script to install Phasar, the above steps are already done.
121+
Use them as a reference if you wish to modify Phasar and recompile it.
139122

140123
Depending on your system, you may get some compiler errors from the json library. If this is the case please change the C++ standard in the top-level CMakeLists.txt:
141124

@@ -182,4 +165,8 @@ To test if everything works as expected please run the following command:
182165

183166
`$ phasar --module test/build_systems_tests/installation_tests/module.ll -D IFDS_SolverTest`
184167

185-
If you obtain output other than a segmentation fault or an exception terminating the program abnormally everything works as expected.
168+
If you obtain output other than a segmentation fault or an exception terminating the program abnormally everything works as expected.
169+
170+
How to use Phasar?
171+
------------------
172+
Please consult our [Phasar wiki pages](https://github.com/secure-software-engineering/phasar/wiki).

bootstrap.sh

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
11
#!/bin/bash
22
set -e
3-
echo "installing phasar dependencies..."
4-
3+
echo "Installing PhASAR dependencies..."
4+
echo "Installing dependencies from sources..."
55
sudo apt-get update
6-
sudo apt-get install zlib1g-dev sqlite3 libsqlite3-dev python3 doxygen graphviz python python-dev python3-pip libxml2 libxml2-dev libncurses5-dev libncursesw5-dev swig build-essential g++ cmake libz3 libz3-dev libedit-dev python-sphinx libomp-dev libcurl4-openssl-dev
6+
sudo apt-get install -y zlib1g zlib1g-dev sqlite3 libsqlite3-dev python3 doxygen graphviz python python-dev python3-pip python-pip libxml2 libxml2-dev libncurses5-dev libncursesw5-dev swig build-essential g++ cmake libedit-dev python-sphinx libcurl4-openssl-dev
77
sudo pip install Pygments
88
sudo pip install pyyaml
9-
# installing boost
10-
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
11-
tar xvf boost_1_66_0.tar.gz
9+
10+
echo "Installing Boost..."
11+
if [ ! -f boost_1_66_0.tar.gz ]
12+
then
13+
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
14+
fi
15+
if [ ! -d boost_1_66_0/ ]
16+
then
17+
tar xvf boost_1_66_0.tar.gz
18+
fi
1219
cd boost_1_66_0/
1320
./bootstrap.sh
14-
sudo ./b2 install
21+
sudo ./b2 -j $(nproc) install
1522
cd ..
16-
# installing LLVM
17-
./utils/install-llvm-8.0.0.sh $(nproc) ./utils/
18-
# installing wllvm
23+
24+
echo "Installing LLVM..."
25+
./utils/install-llvm-8.0.0.sh $(nproc) ./
26+
27+
echo "Installing WLLVM..."
1928
sudo pip3 install wllvm
2029

21-
echo "dependencies successfully installed"
22-
echo "build phasar..."
30+
echo "Dependencies installed successfully."
2331

24-
#git submodule init
25-
#git submodule update
32+
echo "Building PhASAR..."
33+
git submodule init
34+
git submodule update
2635

2736
export CC=/usr/local/bin/clang
2837
export CXX=/usr/local/bin/clang++
2938

30-
mkdir build
39+
mkdir -p build
3140
cd build
3241
cmake -DCMAKE_BUILD_TYPE=Release ..
3342
make -j $(nproc)
34-
echo "phasar successfully built"
35-
echo "install phasar..."
43+
echo "PhASAR built successfully."
44+
echo "Installing PhASAR..."
3645
sudo make install
3746
cd ..
38-
echo "phasar successfully installed"
47+
echo "PhASAR installed successfully."

utils/install-llvm-8.0.0.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ fi
1414
num_cores=$1
1515
target_dir=$2
1616

17-
echo "Getting the complete LLVM source code"
17+
echo "Getting the LLVM source code..."
1818
if [ ! -d "${target_dir}/llvm-project" ]; then
1919
git clone https://github.com/llvm/llvm-project.git ${target_dir}/llvm-project
2020
fi
21-
echo "Build the LLVM project"
21+
echo "Building LLVM..."
2222
cd ${target_dir}/llvm-project/
2323
git checkout llvmorg-8.0.0
2424
mkdir -p build
2525
cd build
2626
cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lld;lldb;compiler-rt;lld;polly;debuginfo-tests;openmp;parallel-libs' -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON ../llvm
2727
make -j${num_cores}
28-
echo "Run all tests"
28+
# echo "Run all tests"
2929
# make -j3 check-all
30-
echo "Installing LLVM"
30+
echo "Installing LLVM..."
3131
sudo make install
3232
sudo ldconfig
33-
echo "Successfully installed LLVM"
33+
echo "Installed LLVM successfully."

0 commit comments

Comments
 (0)