forked from p4lang/p4c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_fedora_deps.sh
executable file
·82 lines (73 loc) · 1.63 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
#!/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 \
ccache \
clang \
cmake \
cpp \
elfutils-libelf-devel \
flex \
g++ \
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 \
procps-ng \
python3 \
python3-pip \
python3-thrift \
readline-devel \
tcpdump \
thrift-devel \
valgrind \
zlib-devel \
ninja-build
sudo pip3 install ply ptf scapy==2.5.0 wheel
# Install dependencies for the BMv2 PTF runner and P4Runtime.
sudo pip3 install --upgrade protobuf==3.20.3
sudo pip3 install --upgrade googleapis-common-protos==1.61.0
sudo pip3 install --upgrade grpcio==1.59.2
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 -j$((`nproc`+1))
make -j$((`nproc`+1)) 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 CC="ccache gcc" CXX="ccache g++"
make -j$((`nproc`+1))
make -j$((`nproc`+1)) install-strip
popd
rm -rf "${tmp_dir}"