Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions devops/containers/release_build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ RUN dnf -y install https://repo.radeon.com/amdgpu-install/6.4.1/rhel/8.10/amdgpu
dnf -y install rocm && \
dnf clean all && rm -rf /var/cache/dnf

# Build zstd static library from sources
COPY scripts/build_zstd.sh /build_zstd.sh
RUN /build_zstd.sh

COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh

USER sycl
Expand Down
4 changes: 2 additions & 2 deletions devops/containers/ubuntu2404_base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ RUN /install.sh
# This causes linking errors when building SYCL runtime.
# Bug: https://github.com/intel/llvm/issues/15935
# Workaround: build zstd from sources with -fPIC flag.
COPY scripts/build_zstd_1_5_6_ub24.sh /build_zstd_1_5_6_ub24.sh
RUN /build_zstd_1_5_6_ub24.sh
COPY scripts/build_zstd.sh /build_zstd.sh
RUN /build_zstd.sh

COPY scripts/create-sycl-user.sh /user-setup.sh
RUN /user-setup.sh
Expand Down
4 changes: 2 additions & 2 deletions devops/containers/ubuntu2404_build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN /install.sh
# This causes linking errors when building SYCL runtime.
# Bug: https://github.com/intel/llvm/issues/15935
# Workaround: build zstd from sources with -fPIC flag.
COPY scripts/build_zstd_1_5_6_ub24.sh /build_zstd_1_5_6_ub24.sh
RUN /build_zstd_1_5_6_ub24.sh
COPY scripts/build_zstd.sh /build_zstd.sh
RUN /build_zstd.sh

SHELL ["/bin/bash", "-ec"]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/bin/bash

# Script to build and install zstd 1.5.6 on Ubuntu 24, with -fPIC flag.
# Script to build and install zstd on Ubuntu 24, with -fPIC flag.
# The default installation of zstd on Ubuntu 24 does not have -fPIC flag
# enabled, which is required for building DPC++ in shared libraries mode.

# Function to check if the OS is Ubuntu 24
# OR on Rocky Linux 8.10 (used for nightly release builds). There is no static
# library (libzstd.a) in available packages, therefore it is necessary to build
# it from source.

# Function to check OS
check_os() {
local expected_name="$1"
local expected_version="$2"
. /etc/os-release
if [[ "$NAME" != "Ubuntu" || "$VERSION_ID" != "24.04" ]]; then
echo "Warning: This script has only been tested with Ubuntu 24."
if [[ "$NAME" == "$expected_name" && "$VERSION_ID" == "$expected_version" ]]; then
return 0
else
return 1
fi
}

Expand Down Expand Up @@ -59,19 +67,21 @@ EOF
}

# Check the OS
check_os
if ! check_os "Ubuntu" "24.04" && ! check_os "Rocky Linux" "8.10"; then
echo "Warning: This script has only been tested with Ubuntu 24.04 and Rocky Linux 8.10."
fi

# Set USE_SUDO to true or false based on your preference
USE_SUDO=true

# Install necessary build tools
install_packages

# Uninstall libzstd-dev package if installed
uninstall_libzstd_dev
# Install necessary build tools & uninstall libzstd-dev package if installed
if check_os "Ubuntu" "24.04"; then
install_packages
uninstall_libzstd_dev
fi

# Define the version and URL for zstd
ZSTD_VERSION="1.5.6"
ZSTD_VERSION="1.5.7"
ZSTD_URL="https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz"

# Create a directory for the source code
Expand Down
Loading