From ac376f176b7fe2b0eb6815394253cdda4dacd43a Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:24:00 +0200 Subject: [PATCH 1/3] Mention cpio and pigz in linux-requirements doc --- docs/workflow/requirements/linux-requirements.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index cdbf731ab0669a..9284d06fffe736 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -109,6 +109,8 @@ Install the following packages for the toolchain: - `krb5-devel` - `lttng-ust-devel` - `ninja-build` (Optional. Enables building native code using `ninja` instead of `make`) +- `pigz` (Optional. Enables parallel gzip compression for tarball creation in `packs` subset) +- `cpio` (Optional. Needed to build RPM packages) ```bash sudo dnf install -y cmake llvm lld lldb clang python curl git \ From ffee57b5f37b6e54695b4329c7044a3ddff50377 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:30:24 +0200 Subject: [PATCH 2/3] More duplicates --- docs/workflow/requirements/linux-requirements.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index 9284d06fffe736..d4a430e324a8d3 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -48,13 +48,15 @@ The packages you need to install are shown in the following list: - `libssl-dev` - `libkrb5-dev` - `ninja-build` (Optional. Enables building native code using `ninja` instead of `make`) +- `pigz` (Optional. Enables parallel gzip compression for tarball creation in `packs` subset) +- `cpio` (Optional. Needed to build RPM packages) **NOTE:** If you are running on *Ubuntu* older than version *22.04 LTS*, or *Debian* older than version 12, then don't install `cmake` using `apt` directly. Follow the instructions in the [CMake on Older Versions of Ubuntu and Debian section](#cmake-on-older-versions-of-ubuntu-and-debian) later down in this doc. ```bash sudo apt install -y cmake llvm lld clang build-essential \ python-is-python3 curl git lldb libicu-dev liblttng-ust-dev \ - libssl-dev libkrb5-dev ninja-build + libssl-dev libkrb5-dev ninja-build pigz cpio ``` #### CMake on Older Versions of Ubuntu and Debian @@ -114,7 +116,7 @@ Install the following packages for the toolchain: ```bash sudo dnf install -y cmake llvm lld lldb clang python curl git \ - libicu-devel openssl-devel krb5-devel lttng-ust-devel ninja-build + libicu-devel openssl-devel krb5-devel lttng-ust-devel ninja-build pigz cpio ``` ### Gentoo From a8a1a520a8805658d1f15a46eadb2a99416d3107 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sun, 10 Nov 2024 13:17:12 +0200 Subject: [PATCH 3/3] Alphabatize and align style --- .../requirements/linux-requirements.md | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index d4a430e324a8d3..65c234b41f067e 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -34,27 +34,28 @@ These instructions are written assuming the current *Ubuntu LTS*. The packages you need to install are shown in the following list: -- `CMake` (version 3.20 or newer) -- `llvm` -- `lld` -- `Clang` (see the [Clang for WASM](#clang-for-wasm) section if you plan on doing work on *Web Assembly (Wasm)*) - `build-essential` -- `python-is-python3` +- `clang` (see the [Clang for WASM](#clang-for-wasm) section if you plan on doing work on *Web Assembly (Wasm)*) +- `cmake` (version 3.20 or newer) +- `cpio` - `curl` - `git` -- `lldb` - `libicu-dev` +- `libkrb5-dev` - `liblttng-ust-dev` - `libssl-dev` -- `libkrb5-dev` +- `lld` +- `lldb` +- `llvm` - `ninja-build` (Optional. Enables building native code using `ninja` instead of `make`) - `pigz` (Optional. Enables parallel gzip compression for tarball creation in `packs` subset) -- `cpio` (Optional. Needed to build RPM packages) +- `python-is-python3` **NOTE:** If you are running on *Ubuntu* older than version *22.04 LTS*, or *Debian* older than version 12, then don't install `cmake` using `apt` directly. Follow the instructions in the [CMake on Older Versions of Ubuntu and Debian section](#cmake-on-older-versions-of-ubuntu-and-debian) later down in this doc. ```bash -sudo apt install -y cmake llvm lld clang build-essential \ +# requires sudo for non-root user +apt install -y cmake llvm lld clang build-essential \ python-is-python3 curl git lldb libicu-dev liblttng-ust-dev \ libssl-dev libkrb5-dev ninja-build pigz cpio ``` @@ -66,7 +67,8 @@ As of now, Ubuntu's `apt` only has until *CMake* version 3.16.3 if you're using To use `snap`, run the following command: ```bash -sudo snap install cmake +# requires sudo for non-root user +snap install cmake ``` To use the *Kitware APT feed*, follow their official instructions [in this link](https://apt.kitware.com/). @@ -76,9 +78,10 @@ To use the *Kitware APT feed*, follow their official instructions [in this link] As of now, *WASM* builds have a minimum requirement of `Clang` version 16 or later (version 18 is the latest at the time of writing this doc). If you're using *Ubuntu 22.04 LTS* or older, then you will have to add an additional repository to `apt` to be able to get said version. Run the following commands on your terminal to do this: ```bash -sudo add-apt-repository -y "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -sudo apt update -y -sudo apt install -y clang-18 +# requires sudo for non-root user +add-apt-repository -y "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" +apt update -y +apt install -y clang-18 ``` You can also take a look at the Linux-based *Dockerfile* [over here](/.devcontainer/Dockerfile) for another example. @@ -87,10 +90,10 @@ You can also take a look at the Linux-based *Dockerfile* [over here](/.devcontai If you're planning to use your environment to do Linux cross-building to other architectures (e.g. Arm32, Arm64), and/or other operating systems (e.g. Alpine, FreeBSD), you'll need to install a few additional dependencies. It is worth mentioning these other packages are required to build the `crossrootfs`, which is used to effectively do the cross-compilation, not to build the runtime itself. -- `qemu` -- `qemu-user-static` - `binfmt-support` - `debootstrap` +- `qemu` +- `qemu-user-static` ### Fedora @@ -98,24 +101,25 @@ These instructions are written assuming *Fedora 40*. Install the following packages for the toolchain: -- `cmake` -- `llvm` -- `lld` -- `lldb` - `clang` -- `python` +- `cmake` +- `cpio` - `curl` - `git` -- `libicu-devel` -- `openssl-devel` - `krb5-devel` +- `libicu-devel` +- `lld` +- `lldb` +- `llvm` - `lttng-ust-devel` - `ninja-build` (Optional. Enables building native code using `ninja` instead of `make`) +- `openssl-devel` - `pigz` (Optional. Enables parallel gzip compression for tarball creation in `packs` subset) -- `cpio` (Optional. Needed to build RPM packages) +- `python` ```bash -sudo dnf install -y cmake llvm lld lldb clang python curl git \ +# requires sudo for non-root user +dnf install -y cmake llvm lld lldb clang python curl git \ libicu-devel openssl-devel krb5-devel lttng-ust-devel ninja-build pigz cpio ```