From 9a8dc617f3c1d963698041d2024c4f76677fa3fe Mon Sep 17 00:00:00 2001 From: Andrew Caylor Date: Wed, 30 Jun 2021 19:53:51 -0400 Subject: [PATCH 1/2] created build guide for ubuntu 20.04 --- README.md | 41 ++++++++++++++++++++++++++++++++++ fizz/ubuntu-build.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 fizz/ubuntu-build.sh diff --git a/README.md b/README.md index 8c15d7852da..73cd01278da 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,38 @@ The source code for this program can be found under `fizz/tool`. ## Building +##### Ubuntu 20.04 LTS + +The following instructions were tested on an ubuntu 20.04.2.0 VM. +This should work with other ubuntu 20.04 versions as well. +However, it will not work with other verions of ubuntu (18.04, 16.04). + +First, run the build script: +```sh +cd fizz +sh ubuntu-build.sh +``` + +Then, cd into the build directory and run the sample application. +```sh +cd fizz/fizz/build_ +``` + +Start a TLS server on port 8443: +(any port greater than 1023 will work without any extra configurations) +```sh +fizz server -accept 8443 +``` + +Then, on the same host, you can connect with: +```sh +fizz client -connect localhost:8443 +``` + ### Ubuntu 16.04 LTS +#### Note: These instructions will not work out-of-the-box. +You will need to solve some version conflicts due to the required versions +for some libraries only being avaliable for download using apt on ubuntu 20.04. To begin, you should install the dependencies we need for build. This largely consists of [folly](https://github.com/facebook/folly)'s dependencies, as well as @@ -128,6 +159,16 @@ sudo apt-get install \ libsodium-dev ``` +First, build and install fmt (a folly dependency): + +```sh +git clone https://github.com/fmtlib/fmt.git +mkdir fmt/_build && cd fmt/_build +cmake .. +make -j$(nproc) +sudo make install +``` + Then, build and install folly: ```sh diff --git a/fizz/ubuntu-build.sh b/fizz/ubuntu-build.sh new file mode 100644 index 00000000000..915131547db --- /dev/null +++ b/fizz/ubuntu-build.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +#install all dependencies needed +sudo apt-get install \ +g++ \ +cmake \ +libboost-all-dev \ +libevent-dev \ +libdouble-conversion-dev \ +libgoogle-glog-dev \ +libgflags-dev \ +libiberty-dev \ +liblz4-dev \ +liblzma-dev \ +libsnappy-dev \ +make \ +zlib1g-dev \ +binutils-dev \ +libjemalloc-dev \ +libssl-dev \ +pkg-config \ +libunwind-dev \ +libsodium-dev \ +git \ +libzstd-dev \ +libgmock-dev \ +libgtest-dev + +#build and install fmt (folly dependency) +git clone https://github.com/fmtlib/fmt.git +mkdir fmt/_build && cd fmt/_build +cmake .. +make -j$(nproc) +sudo make install + +cd ../.. + +#build and install folly +git clone https://github.com/facebook/folly.git +mkdir folly/_build && cd folly/_build +cmake .. +make -j $(nproc) +sudo make install + +cd ../.. + +#build and install fizz +git clone https://github.com/facebookincubator/fizz +mkdir fizz/fizz/build_ && cd fizz/fizz/build_ +cmake .. +make -j $(nproc) +sudo make install From 27da297afa4e227671de283679d5bb69c9969653 Mon Sep 17 00:00:00 2001 From: Andrew Caylor Date: Wed, 30 Jun 2021 19:55:00 -0400 Subject: [PATCH 2/2] README style fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73cd01278da..cd63c65d02c 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ The source code for this program can be found under `fizz/tool`. ## Building -##### Ubuntu 20.04 LTS +### Ubuntu 20.04 LTS The following instructions were tested on an ubuntu 20.04.2.0 VM. This should work with other ubuntu 20.04 versions as well.