From 500300e404bf2dce95bff19c95fde6e01f071b44 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 13 Jul 2024 20:13:49 +0300 Subject: [PATCH 1/6] Add fedora in install script --- eng/install-native-dependencies.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 42a3727b3188a0..41895e0b9254c8 100755 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -27,6 +27,8 @@ case "$os" in libssl-dev libkrb5-dev zlib1g-dev localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 + elif [ "$ID" = "fedora" ]; then + dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel zlib-devel lttng-ust-devel elif [ "$ID" = "alpine" ]; then apk add build-base cmake bash curl clang llvm-dev krb5-dev lttng-ust-dev icu-dev zlib-dev openssl-dev else From a1b1b925223d98fb8b97ae8201375bb0d562c56d Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 13 Jul 2024 20:47:13 +0300 Subject: [PATCH 2/6] Remove zlib and mention the script --- docs/workflow/requirements/linux-requirements.md | 10 ++++++++-- eng/install-native-dependencies.sh | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index 334e5e2ae354c3..8f95634397178b 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -22,6 +22,13 @@ Minimum RAM required to build is 1GB. The build is known to fail on 512 MB VMs ( ### Toolchain Setup +You can use this helper script to install dependencies on some platforms: + +```bash +sudo eng/install-native-dependencies.sh +# or without 'sudo' if you are root +``` + Install the following packages for the toolchain: * CMake 3.20 or newer @@ -37,7 +44,6 @@ Install the following packages for the toolchain: * liblttng-ust-dev * libssl-dev * libkrb5-dev -* zlib1g-dev * ninja-build (optional, enables building native code with ninja instead of make) **NOTE**: If you have an Ubuntu version older than 22.04 LTS, or Debian version older than 12, don't install `cmake` using `apt` directly. Follow the note written down below. @@ -45,7 +51,7 @@ Install the following packages for the toolchain: ```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 zlib1g-dev ninja-build +libssl-dev libkrb5-dev ninja-build ``` **NOTE**: As of now, Ubuntu's `apt` only has until CMake version 3.16.3 if you're using Ubuntu 20.04 LTS (less in older Ubuntu versions), and version 3.18.4 in Debian 11 (less in older Debian versions). This is lower than the required 3.20, which in turn makes it incompatible with the repo. For this case, we can use the `snap` package manager or the _Kitware APT feed_ to get a new enough version of CMake. diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 41895e0b9254c8..1d75c9aa17d0af 100755 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -24,13 +24,13 @@ case "$os" in apt update apt install -y build-essential gettext locales cmake llvm clang lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ - libssl-dev libkrb5-dev zlib1g-dev + libssl-dev libkrb5-dev localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 elif [ "$ID" = "fedora" ]; then - dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel zlib-devel lttng-ust-devel + dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel elif [ "$ID" = "alpine" ]; then - apk add build-base cmake bash curl clang llvm-dev krb5-dev lttng-ust-dev icu-dev zlib-dev openssl-dev + apk add build-base cmake bash curl clang llvm-dev krb5-dev lttng-ust-dev icu-dev openssl-dev else echo "Unsupported distro. distro: $ID" exit 1 From 368b17d595ac2f943e60a5e534922b064acdb8d0 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 13 Jul 2024 21:20:47 +0300 Subject: [PATCH 3/6] Update linux-requirements.md --- docs/workflow/requirements/linux-requirements.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index b7c549c25d6dce..56fbb6538a01b7 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -21,11 +21,6 @@ Below are the requirements for toolchain setup, depending on your environment. P Minimum RAM required to build is 1GB. The build is known to fail on 512 MB VMs ([dotnet/runtime#4069](https://github.com/dotnet/runtime/issues/4069)). - -### Debian-based / Ubuntu - -These instructions are written assuming the current Ubuntu LTS. - You can use this helper script to install dependencies on some platforms: ```bash @@ -33,6 +28,10 @@ sudo eng/install-native-dependencies.sh # or without 'sudo' if you are root ``` +### Debian-based / Ubuntu + +These instructions are written assuming the current Ubuntu LTS. + Install the following packages for the toolchain: * CMake 3.20 or newer From 95dc2d23c5e20d0c49b440f12cc1d2c722db069f Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 13 Jul 2024 23:10:38 +0300 Subject: [PATCH 4/6] Update linux-requirements.md --- docs/workflow/requirements/linux-requirements.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index 56fbb6538a01b7..bad28d08febcc2 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -97,13 +97,12 @@ Install the following packages for the toolchain: * libicu-devel * openssl-devel * krb5-devel -* zlib-devel * lttng-ust-devel * ninja-build (optional, enables building native code with ninja instead of make) ```bash sudo dnf install -y cmake llvm lld lldb clang python curl git libicu-devel openssl-devel \ -krb5-devel zlib-devel lttng-ust-devel ninja-build +krb5-devel lttng-ust-devel ninja-build ``` ### Gentoo From 9347f444211027e1ebdb62c316dca669b0b4eb72 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 13 Jul 2024 23:11:46 +0300 Subject: [PATCH 5/6] Update linux-requirements.md --- docs/workflow/requirements/linux-requirements.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index bad28d08febcc2..ea7f849e2312b0 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -53,8 +53,8 @@ Install the following packages for the toolchain: ```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 + python-is-python3 curl git lldb libicu-dev liblttng-ust-dev \ + libssl-dev libkrb5-dev ninja-build ``` **NOTE**: As of now, Ubuntu's `apt` only has until CMake version 3.16.3 if you're using Ubuntu 20.04 LTS (less in older Ubuntu versions), and version 3.18.4 in Debian 11 (less in older Debian versions). This is lower than the required 3.20, which in turn makes it incompatible with the repo. For this case, we can use the `snap` package manager or the _Kitware APT feed_ to get a new enough version of CMake. @@ -102,7 +102,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 + krb5-devel lttng-ust-devel ninja-build ``` ### Gentoo From a72f723f9e84774e03fd0309c2efc44de9891525 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sat, 13 Jul 2024 23:54:52 +0300 Subject: [PATCH 6/6] Revert zlib changes --- docs/workflow/requirements/linux-requirements.md | 6 ++++-- eng/install-native-dependencies.sh | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index ea7f849e2312b0..6b4aa1ee65ec3f 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -47,6 +47,7 @@ Install the following packages for the toolchain: * liblttng-ust-dev * libssl-dev * libkrb5-dev +* zlib1g-dev * ninja-build (optional, enables building native code with ninja instead of make) **NOTE**: If you have an Ubuntu version older than 22.04 LTS, or Debian version older than 12, don't install `cmake` using `apt` directly. Follow the note written down below. @@ -54,7 +55,7 @@ Install the following packages for the toolchain: ```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 zlib1g-dev ninja-build ``` **NOTE**: As of now, Ubuntu's `apt` only has until CMake version 3.16.3 if you're using Ubuntu 20.04 LTS (less in older Ubuntu versions), and version 3.18.4 in Debian 11 (less in older Debian versions). This is lower than the required 3.20, which in turn makes it incompatible with the repo. For this case, we can use the `snap` package manager or the _Kitware APT feed_ to get a new enough version of CMake. @@ -97,12 +98,13 @@ Install the following packages for the toolchain: * libicu-devel * openssl-devel * krb5-devel +* zlib-devel * lttng-ust-devel * ninja-build (optional, enables building native code with ninja instead of make) ```bash sudo dnf install -y cmake llvm lld lldb clang python curl git libicu-devel openssl-devel \ - krb5-devel lttng-ust-devel ninja-build + krb5-devel zlib-devel lttng-ust-devel ninja-build ``` ### Gentoo diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 1d75c9aa17d0af..41895e0b9254c8 100755 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -24,13 +24,13 @@ case "$os" in apt update apt install -y build-essential gettext locales cmake llvm clang lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ - libssl-dev libkrb5-dev + libssl-dev libkrb5-dev zlib1g-dev localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 elif [ "$ID" = "fedora" ]; then - dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel lttng-ust-devel + dnf install -y cmake llvm lld lldb clang python curl libicu-devel openssl-devel krb5-devel zlib-devel lttng-ust-devel elif [ "$ID" = "alpine" ]; then - apk add build-base cmake bash curl clang llvm-dev krb5-dev lttng-ust-dev icu-dev openssl-dev + apk add build-base cmake bash curl clang llvm-dev krb5-dev lttng-ust-dev icu-dev zlib-dev openssl-dev else echo "Unsupported distro. distro: $ID" exit 1