forked from p4lang/p4c
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_fedora_deps.sh
executable file
·83 lines (74 loc) · 1.44 KB
/
install_fedora_deps.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
#!/bin/bash
set -e
sudo dnf install -y -q \
automake \
bison \
boost-devel \
boost-filesystem \
boost-graph \
boost-iostreams \
boost-program-options \
boost-system \
boost-test \
boost-thread \
clang \
cmake \
cpp \
elfutils-libelf-devel \
flex \
g++ \
gc-devel \
git \
gmp-devel \
grpc-devel \
grpc-plugins \
iproute \
iptables-legacy \
libevent-devel \
libfl-devel \
libpcap-devel \
libtool \
llvm \
make \
nanomsg-devel \
net-tools \
openssl-devel \
pkg-config \
protobuf-devel \
protobuf-static \
python3 \
python3-pip \
python3-thrift \
readline-devel \
tcpdump \
thrift-devel \
valgrind \
zlib-devel
sudo pip3 install ipaddr ply ptf scapy==2.4.5 wheel
MAKEFLAGS="-j$(nproc)"
export MAKEFLAGS
# Install PI from source
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
pushd "${tmp_dir}"
git clone --recurse-submodules --depth=1 https://github.com/p4lang/PI
cd PI
./autogen.sh
./configure --with-proto
make
make install
popd
# Install BMv2 from source
pushd "${tmp_dir}"
git clone --depth=1 https://github.com/p4lang/behavioral-model
cd behavioral-model
./autogen.sh
./configure --with-pdfixed --with-thrift --with-pi --with-stress-tests --enable-debugger
make
make install-strip
cd targets/simple_switch_grpc/
./autogen.sh
./configure --with-thrift
make
make install-strip
popd
rm -rf "${tmp_dir}"