Debian Codegraph @

crt/s2n/codebuild/bin/install_sidetrail_dependencies.sh

raw symbols SCIP
1 #!/bin/bash
2 # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License").
5 # You may not use this file except in compliance with the License.
6 # A copy of the License is located at
7 #
8 # http://aws.amazon.com/apache2.0
9 #
10 # or in the "license" file accompanying this file. This file is distributed
11 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 # express or implied. See the License for the specific language governing
13 # permissions and limitations under the License.
14 #
15
16 set -e
17 set -x
18
19 #Figlet is required for ctverif printing
20 sudo apt-get install -y figlet
21
22 #Install boogieman
23 gem install bam-bam-boogieman
24 which bam
25
26 #Install the apt-get dependencies from the smack build script: this way they will still be there
27 #when we get things from cache
28 DEPENDENCIES="git cmake python-yaml python-psutil unzip wget python3-yaml"
29 DEPENDENCIES+=" mono-complete libz-dev libedit-dev"
30 DEPENDENCIES+=" clang-3.9 llvm-3.9 llvm-3.9-dev"
31
32 # Adding MONO repository
33 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
34 echo "deb http://download.mono-project.com/repo/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/mono-official.list
35
36 sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
37 sudo apt-get install -y ${DEPENDENCIES}
38 pip install pyyaml
39
40 LLVM_SHORT_VERSION=3.9
41
42 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_SHORT_VERSION} 30
43 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_SHORT_VERSION} 30
44 sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${LLVM_SHORT_VERSION} 30
45 sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-${LLVM_SHORT_VERSION} 30
46 sudo update-alternatives --install /usr/bin/llvm-dis llvm-dis /usr/bin/llvm-dis-${LLVM_SHORT_VERSION} 30
47
48 which clang
49 clang --version
50 clang-3.9 --version
51
52 mkdir -p ~/override_clang
53 ln -s /usr/bin/clang ~/override_clang/clang
54 ln -s /usr/bin/clang++ ~/override_clang/clang++
55 ln -s /usr/bin/llvm-config ~/override_clang/llvm-config
56 ln -s /usr/bin/llvm-link ~/override_clang/llvm-link
57 ln -s /usr/bin/llvm-dis ~/override_clang/llvm-dis
58 sudo chmod +x ~/override_clang/*
59
60 export PATH="$HOME/override_clang/:${PATH}"
61 which clang
62 clang --version
63 clang-3.9 --version
64
65 which python
66 python --version
67 pip install psutil