Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created ubuntu 20.04 build guide #64

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
52 changes: 52 additions & 0 deletions fizz/ubuntu-build.sh
Original file line number Diff line number Diff line change
@@ -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