From c2cfde0749a9b8890c95c4ebf172a52a17ab4ef2 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 23 Feb 2024 17:49:53 +0100 Subject: [PATCH] chore: Update docs for building Zebra (#8315) * Update build instructions with scanning enabled * Remove `pkg-config` from build deps in README I tried compiling Zebra with `--all-features` on a Linux machine without `pkg-config` or `pkfgconf` (which is an alternative to `pkg-config`), and it worked. * Add `protoc` to build deps in README --- README.md | 15 +++++++++++---- book/src/user/shielded-scan.md | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c1704fe3b..a07298a05 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ For more information, read our [Docker documentation](https://zebra.zfnd.org/use ### Building Zebra Building Zebra requires [Rust](https://www.rust-lang.org/tools/install), -[libclang](https://clang.llvm.org/doxygen/group__CINDEX.html), -[pkg-config](http://pkgconf.org/), and a C++ compiler. +[libclang](https://clang.llvm.org/doxygen/group__CINDEX.html), and a C++ +compiler. Zebra is tested with the latest `stable` Rust version. Earlier versions are not supported or tested. Any Zebra release can start depending on new features in the @@ -86,7 +86,14 @@ Below are quick summaries for installing the dependencies on your machine. package manager. Typical names are `libclang`, `libclang-dev`, `llvm`, or `llvm-dev`. - **clang** or another C++ compiler: `g++` (all platforms) or `Xcode` (macOS). - - **pkg-config** + - **[`protoc`](https://grpc.io/docs/protoc-installation/)** + +> [!NOTE] +> Zebra uses the `--experimental_allow_proto3_optional` flag with `protoc` +> during compilation. This flag was introduced in [Protocol Buffers +> v3.12.0](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0) +> released in May 16, 2020, so make sure you're not using a version of `protoc` +> older than 3.12. @@ -97,7 +104,7 @@ Below are quick summaries for installing the dependencies on your machine. ```sh -sudo pacman -S rust clang pkgconf +sudo pacman -S rust clang protobuf ``` Note that the package `clang` includes `libclang` as well as the C++ compiler. diff --git a/book/src/user/shielded-scan.md b/book/src/user/shielded-scan.md index eae10cbdd..5d926be1e 100644 --- a/book/src/user/shielded-scan.md +++ b/book/src/user/shielded-scan.md @@ -15,7 +15,7 @@ keys for experimental use or publicly known keys. ## Build & Install -Use [Zebra 1.5.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.5.0) +Use [Zebra 1.6.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.6.0) or greater, or the `main` branch to get the latest features, and enable the `shielded-scan` feature during the build. You can also use Rust's `cargo` to install the latest release: