From 866dfae99c85df7a6f69300cae04ddb8dfb3edfd Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Tue, 21 Mar 2023 13:12:34 -0400 Subject: [PATCH 1/4] Minor pinned build script README changes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 436cc0b7c6..f4cb1595c6 100644 --- a/README.md +++ b/README.md @@ -111,12 +111,12 @@ Make sure you are in the root of the `leap` repo, then run the `install_depts.sh sudo scripts/install_deps.sh ``` -Next, run the pinned build script. You have to give it three arguments, in the following order: +Next, run the pinned build script. You have to give it three arguments in the following order: - A temporary folder, for all dependencies that need to be built from source. - A build folder, where the binaries you need to install will be built to. - The number of jobs or CPU cores/threads to use (note the [jobs flag](#step-3---build) warning above). -The following command runs the `pinned_build.sh` script, specifies a `deps` and `build` folder in the root of the Leap repo for the first two arguments, then builds the packages using all of your computer's CPU threads (Note: you don't need `sudo` for this command): +For example, the following command runs the `pinned_build.sh` script, specifies a `deps` and `build` folder in the root of the Leap repo for the first two arguments, then builds the packages using all of your computer's CPU threads (note: you don't need `sudo` for this command): ```bash scripts/pinned_build.sh deps build "$(nproc)" ``` From df3685516edbfabcd1cb825ebc7d09f2ca494bcc Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Tue, 21 Mar 2023 13:17:58 -0400 Subject: [PATCH 2/4] Pull note about sudo into its own quote block --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f4cb1595c6..eed327f539 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,9 @@ Next, run the pinned build script. You have to give it three arguments in the fo - A build folder, where the binaries you need to install will be built to. - The number of jobs or CPU cores/threads to use (note the [jobs flag](#step-3---build) warning above). -For example, the following command runs the `pinned_build.sh` script, specifies a `deps` and `build` folder in the root of the Leap repo for the first two arguments, then builds the packages using all of your computer's CPU threads (note: you don't need `sudo` for this command): +> 🔒 You do not need to run this script with `sudo` or as root. + +For example, the following command runs the `pinned_build.sh` script, specifies a `deps` and `build` folder in the root of the Leap repo for the first two arguments, then builds the packages using all of your computer's CPU threads: ```bash scripts/pinned_build.sh deps build "$(nproc)" ``` From 7f27916d3df0e2afe11f11fe65b7cec5b51bfae2 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Fri, 17 Mar 2023 02:02:01 -0400 Subject: [PATCH 3/4] Cardinal objects should be in a numbered list --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eed327f539..c3e4b2d84b 100644 --- a/README.md +++ b/README.md @@ -112,9 +112,9 @@ sudo scripts/install_deps.sh ``` Next, run the pinned build script. You have to give it three arguments in the following order: - - A temporary folder, for all dependencies that need to be built from source. - - A build folder, where the binaries you need to install will be built to. - - The number of jobs or CPU cores/threads to use (note the [jobs flag](#step-3---build) warning above). +1. A temporary folder, for all dependencies that need to be built from source. +1. A build folder, where the binaries you need to install will be built to. +1. The number of jobs or CPU cores/threads to use (note the [jobs flag](#step-3---build) warning above). > 🔒 You do not need to run this script with `sudo` or as root. From 8fc769efd1dc4818d1714ec493aac3b4e60047a7 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Fri, 17 Mar 2023 01:55:45 -0400 Subject: [PATCH 4/4] Restore markdown formatting erroneously deleted in commit 06c9e2532775633466e11225071d384de5b626d1 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3e4b2d84b..f16973bf5c 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ git clone --recursive https://github.com/AntelopeIO/leap.git git clone --recursive git@github.com:AntelopeIO/leap.git ``` -> ℹī¸ **HTTPS vs. SSH Clone** ℹī¸ +> ℹī¸ **HTTPS vs. SSH Clone** ℹī¸ Both an HTTPS or SSH git clone will yield the same result - a folder named `leap` containing our source code. It doesn't matter which type you use. Navigate into that folder: @@ -96,13 +96,13 @@ git submodule update --init --recursive ### Step 3 - Build Select build instructions below for a [pinned build](#pinned-build) (preferred) or an [unpinned build](#unpinned-build). -> ℹī¸ **Pinned vs. Unpinned Build** ℹī¸ +> ℹī¸ **Pinned vs. Unpinned Build** ℹī¸ We have two types of builds for Leap: "pinned" and "unpinned." The only difference is that pinned builds use specific versions for some dependencies hand-picked by the Leap engineers - they are "pinned" to those versions. In contrast, unpinned builds use the default dependency versions available on the build system at the time. We recommend performing a "pinned" build to ensure the compiler and boost versions remain the same between builds of different Leap versions. Leap requires these versions to remain the same, otherwise its state might need to be recovered from a portable snapshot or the chain needs to be replayed. -> ⚠ī¸ **A Warning On Parallel Compilation Jobs (`-j` flag)** ⚠ī¸ +> ⚠ī¸ **A Warning On Parallel Compilation Jobs (`-j` flag)** ⚠ī¸ When building C/C++ software, often the build is performed in parallel via a command such as `make -j "$(nproc)"` which uses all available CPU threads. However, be aware that some compilation units (`*.cpp` files) in Leap will consume nearly 4GB of memory. Failures due to memory exhaustion will typically, but not always, manifest as compiler crashes. Using all available CPU threads may also prevent you from doing other things on your computer during compilation. For these reasons, consider reducing this value. -> 🐋 **Docker and `sudo`** 🐋 +> 🐋 **Docker and `sudo`** 🐋 If you are in an Ubuntu docker container, omit `sudo` from all commands because you run as `root` by default. Most other docker containers also exclude `sudo`, especially Debian-family containers. If your shell prompt is a hash tag (`#`), omit `sudo`. #### Pinned Build