From f1409f0d06b99dff4dc990ea176289325254b0b1 Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Wed, 11 Nov 2026 16:47:47 +0100 Subject: [PATCH] [release/6.0] Backport native dependency installer from #7760 Add only the executable dependency-install wrapper required by Copilot review setup on release/6.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c994e9a3-e808-41bd-92b6-f7f1d8791b8b --- eng/install-dependencies.sh | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 eng/install-dependencies.sh diff --git a/eng/install-dependencies.sh b/eng/install-dependencies.sh new file mode 100755 index 0000000000..2a3c2b156a --- /dev/null +++ b/eng/install-dependencies.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +os="$(echo "$1" | tr "[:upper:]" "[:lower:]")" + +if [ -z "$os" ]; then + . "$(dirname "$0")"/common/native/init-os-and-arch.sh +fi + +if [ "$os" = "linux" ]; then + if [ -e /etc/os-release ]; then + . /etc/os-release + fi + + if [ "$ID" = "rhel" ] || [ "$ID" = "centos" ] || [ "$ID" = "azurelinux" ]; then + echo "warning: libomp was not installed automatically for $ID. Install it manually before building ML.NET." >&2 + fi +fi + +"$(dirname "$0")"/common/native/install-dependencies.sh "$os" + +case "$os" in + linux) + if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then + apt install -y libomp-dev + elif [ "$ID" = "fedora" ]; then + dnf install -y libomp-devel + elif [ "$ID" = "amzn" ]; then + dnf install -y libomp-devel + elif [ "$ID" = "alpine" ]; then + apk add openmp-dev + fi + ;; + + osx|maccatalyst|ios|iossimulator|tvos|tvossimulator) + brew install libomp + brew link libomp --force + ;; +esac