The globally installed version of cmake on advos is too old for this to work, so if you want to do this on advos, install cmake locally, then skip to Building the Demo. If you are running on your own machine, make sure all of the dependencies are installed. After the project 3 deadline, we plan to upgrade the cmake on advos to eliminate the first step.
Install cmake locally (you can do this on advos without sudo):
wget https://github.com/Kitware/CMake/releases/download/v3.23.0/cmake-3.23.0-linux-x86_64.sh
mkdir -p $HOME/localcmake
sh cmake-3.23.0-linux-x86_64.sh --prefix=$HOME/localcmake --skip-license
export PATH=$HOME/localcmake/bin:$PATH #You need to do this every time you login, otherwise put in $HOME/.profile
which cmake # /home/<gtid>/localcmake/bin/cmake
cmake --version # cmake version 3.23.0Install cmake with sudo:
sudo apt-get install cmake
cmake --version # output should be >= 3.15Dependencies to build gRPC:
sudo apt-get install build-essential autoconf libtool pkg-configninja-build is an optional dependency that can speed up the gRPC build.
sudo apt-get install ninja-build # optional dependency
ninja --version #Check installgit clone https://github.com/danieldzahka/gRPC_Demo.git
cd gRPC_Demo
cmake -S . -B ./build #-G Ninja (optional: add this if you installed ninja-build)
cmake --build ./build --target client serverIf you are on advos, make sure you are using unique port
In one terminal:
cd build
./src/serverIn a different terminal:
cd build
./src/clientIf you are running on a shared machine (like advos) you will need to run your server/client on a port that doesn't conflict with other students on the same machine.