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

Update README commands to fix compilation issues #2

Open
wants to merge 7 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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ find_package(OpenEnclave CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)

# GRPC and Protocol Buffers libraries location
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/third_party/protobuf/install" "${CMAKE_SOURCE_DIR}/third_party/grpc/build/install")
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/third_party/protobuf/install" "${CMAKE_SOURCE_DIR}/third_party/grpc/install")

# Cmake find modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
Expand Down
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,37 +244,52 @@ All figures produced by this artifact are located in `~/snoopy/experiments/artif

# Playing with Snoopy
## Building Snoopy Locally

Make sure submodules are cloned recurisvely:

```sh
git submodule update --init --recursive
```

You could also have cloned this repo with `git clone --recursive REPO_URL` to do this automatically.

**On Ubuntu 20.04 or later, you will need to install g++-7 and replace all instances of `cmake` with `CXX=g++-7 cmake` in the below commands.** This code relies on intrinsic builtins present in g++ 7 but not later versions of g++.

Protobuf:
```sh
# On ubuntu 18.04
sudo apt-get install build-essential autoconf libtool pkg-config automake zlib1g-dev
cd third_party
git submodule update --init
cd protobuf/cmake
cd third_party/protobuf
mkdir build
cd build
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../install ..
make -j `nproc`
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/../install ../cmake
make -j`nproc`
make install
```

gRPC (requires protobuf first):
```sh
cd grpc
git submodule update --init
cd third_party/grpc
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=`pwd`/../../protobuf/cmake/install -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF \
cmake -DCMAKE_PREFIX_PATH=`pwd`/../../protobuf/install -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF \
-DgRPC_PROTOBUF_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package -DgRPC_CARES_PROVIDER=module -DgRPC_SSL_PROVIDER=package \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=`pwd`/install \
-DCMAKE_INSTALL_PREFIX=`pwd`/../install \
../
make
make -j`nproc`
make install
```

Need to put boost library in `/usr/local/` (doesn't need to be built or installed).

Compile Snoopy:
```sh
mkdir build
cmake ..
make -j suboram && make -j
```

Running anything in the `scripts` directory:

Follow instructions here: https://docs.microsoft.com/en-us/azure/developer/python/configure-local-development-environment?tabs=cmd
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
azure-mgmt-resource
azure-mgmt-compute
azure-mgmt-network
azure-identity
numpy
matplotlib
seaborn
tqdm
brewer2mpl
azure-mgmt-resource==19.0.0
azure-mgmt-compute==19.0.0
azure-mgmt-network==19.0.0
azure-identity==1.13.0
numpy==1.24.3
matplotlib==3.7.1
seaborn==0.12.2
tqdm==4.65.0
brewer2mpl==1.4.1