docker: use newer TBB version to resolve build issues with LLVM 21

This commit is contained in:
Arina Neshlyaeva
2026-01-23 17:32:26 -08:00
committed by aneshlya
parent c470a58d30
commit 3fca758339
9 changed files with 73 additions and 20 deletions
+12 -2
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017-2025, Intel Corporation
# Copyright (c) 2017-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -14,9 +14,19 @@ ARG SHA=main
# otherwise LLVM build may fail, as it will use all the cores available to container.
# Packages required to build ISPC and Clang.
RUN dnf -y update && dnf install -y wget yum-utils gcc gcc-c++ git make xz tbb-devel python38 python38-devel && \
RUN dnf -y update && dnf install -y wget yum-utils gcc gcc-c++ git make xz python38 python38-devel && \
dnf clean -y all
# Install TBB from Intel oneAPI.
# Use oneAPI TBB instead of system TBB to avoid enum-constexpr-conversion errors with LLVM 21+
RUN rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
yum-config-manager --add-repo https://yum.repos.intel.com/oneapi && \
dnf install -y intel-oneapi-tbb-devel && \
dnf clean -y all
# Set TBB_ROOT to point to oneAPI TBB installation
ENV TBB_ROOT=/opt/intel/oneapi/tbb/latest
# These packages are required if you need to link ISPC with -static.
# Ninja is required for superbuild
RUN dnf -y --enablerepo=powertools install ninja-build libstdc++-static && \
+5 -4
View File
@@ -1,9 +1,9 @@
#
# Copyright (c) 2017-2025, Intel Corporation
# Copyright (c) 2017-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
FROM fedora:39
FROM fedora:41
LABEL maintainer="Nurmukhametov, Aleksei <aleksei.nurmukhametov@intel.com>"
SHELL ["/bin/bash", "-c"]
@@ -14,7 +14,8 @@ ARG SHA=main
RUN if [ -v http_proxy ]; then echo "proxy=$http_proxy" >> /etc/dnf/dnf.conf; fi
# Packages required to build ISPC.
RUN dnf install -y git cmake python3-setuptools python3-devel && \
# Fedora 41 provides TBB 2021.x (libtbb.so.12) which is compatible with LLVM 21+
RUN dnf install -y git cmake python3-setuptools python3-devel wget dnf-plugins-core && \
dnf install -y clang-devel llvm-devel glibc-devel.i686 && \
dnf install -y flex bison tbb-devel && \
dnf clean -y all
@@ -35,7 +36,7 @@ USER ispc_user
# Clone, configure and build ISPC
# Some check-all tests may fail because we use system LLVM here
RUN git clone --depth=1 https://github.com/$REPO.git ispc && \
RUN git clone https://github.com/$REPO.git ispc && \
git -C ispc checkout $SHA && \
cmake ispc -B build-ispc -DCMAKE_INSTALL_PREFIX=/usr && \
cmake --build build-ispc -v -j "$(nproc)" && \
+12 -2
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017-2025, Intel Corporation
# Copyright (c) 2017-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -19,9 +19,19 @@ ARG LLVM_DISABLE_ASSERTIONS
RUN uname -a
# Packages required to build ISPC and Clang.
RUN apt-get -y update && apt-get --no-install-recommends install -y wget build-essential gcc g++ git ca-certificates libtbb-dev ninja-build && \
RUN apt-get -y update && apt-get --no-install-recommends install -y wget build-essential gcc g++ git ca-certificates ninja-build gnupg && \
rm -rf /var/lib/apt/lists/*
# Install TBB from Intel oneAPI.
# Use oneAPI TBB instead of system TBB to avoid enum-constexpr-conversion errors with LLVM 21+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
apt-get -y update && apt-get --no-install-recommends install -y intel-oneapi-tbb-devel && \
rm -rf /var/lib/apt/lists/*
# Set TBB_ROOT to point to oneAPI TBB installation
ENV TBB_ROOT=/opt/intel/oneapi/tbb/latest
# Install multilib libc needed to build clang_rt
RUN if [[ $(uname -m) =~ "x86" ]]; then \
export CROSS_LIBS="libc6-dev-i386=2.27-3ubuntu*"; \
+12 -3
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2024-2025, Intel Corporation
# Copyright (c) 2024-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -32,8 +32,17 @@ RUN if [[ $(uname -m) =~ "x86" ]]; then \
apt-get -y update && apt-get --no-install-recommends install -y "$CROSS_LIBS" && \
rm -rf /var/lib/apt/lists/*
# Install TBB (required for ISPCRT).
RUN if [ "$XE_DEPS" == "ON" ]; then apt-get -y update && apt-get --no-install-recommends install -y libtbb-dev && rm -rf /var/lib/apt/lists/*; fi
# Install TBB from Intel oneAPI (required for ISPCRT).
# Use oneAPI TBB instead of system TBB to avoid enum-constexpr-conversion errors with LLVM 21+
RUN if [ "$XE_DEPS" == "ON" ]; then \
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
apt-get -y update && apt-get --no-install-recommends install -y intel-oneapi-tbb-devel && \
rm -rf /var/lib/apt/lists/*; \
fi
# Set TBB_ROOT to point to oneAPI TBB installation
ENV TBB_ROOT=/opt/intel/oneapi/tbb/latest
# Download and install required version of cmake (3.23.5 for both x86 and aarch64) as required for superbuild preset jsons.
RUN if [[ $(uname -m) =~ "x86" ]]; then \
+12 -2
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017-2024, Intel Corporation
# Copyright (c) 2017-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -16,9 +16,19 @@ ARG SHA=main
RUN uname -a
# Packages
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y wget build-essential gcc g++ git python3-dev ca-certificates libtbb-dev ninja-build && \
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y wget build-essential gcc g++ git python3-dev ca-certificates ninja-build gnupg && \
rm -rf /var/lib/apt/lists/*
# Install TBB from Intel oneAPI.
# Use oneAPI TBB instead of system TBB to avoid enum-constexpr-conversion errors with LLVM 21+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
apt-get -y update && apt-get --no-install-recommends install -y intel-oneapi-tbb-devel && \
rm -rf /var/lib/apt/lists/*
# Set TBB_ROOT to point to oneAPI TBB installation
ENV TBB_ROOT=/opt/intel/oneapi/tbb/latest
# Install multilib libc needed to build clang_rt
RUN if [[ $(uname -m) =~ "x86" ]]; then \
export CROSS_LIBS="libc6-dev-i386"; \
+12 -2
View File
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017-2024, Intel Corporation
# Copyright (c) 2017-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -17,10 +17,20 @@ ARG LTO=OFF
# Packages
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y clang-8 build-essential \
libnuma1 opencl-headers ocl-icd-libopencl1 clinfo vim gcc g++ git python3-dev imagemagick m4 bison flex \
libc6-dev-i386 cpio lsb-core wget gnupg netcat-openbsd libtbb-dev libglfw3-dev pkgconf gdb gcc-multilib g++-multilib curl ca-certificates && \
libc6-dev-i386 cpio lsb-core wget gnupg netcat-openbsd libglfw3-dev pkgconf gdb gcc-multilib g++-multilib curl ca-certificates && \
apt-get --no-install-recommends install -y ninja-build && \
rm -rf /var/lib/apt/lists/*
# Install TBB from Intel oneAPI.
# Use oneAPI TBB instead of system TBB to avoid enum-constexpr-conversion errors with LLVM 21+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
apt-get -y update && apt-get --no-install-recommends install -y intel-oneapi-tbb-devel && \
rm -rf /var/lib/apt/lists/*
# Set TBB_ROOT to point to oneAPI TBB installation
ENV TBB_ROOT=/opt/intel/oneapi/tbb/latest
# Download and install required version of cmake (3.23.5 for both x86 and aarch64) as required for superbuild preset jsons.
RUN if [[ $(uname -m) =~ "x86" ]]; then \
export CMAKE_URL="https://cmake.org/files/v3.23/cmake-3.23.5-linux-x86_64.sh"; \
@@ -26,7 +26,7 @@ RUN uname -a
RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y \
wget ninja-build build-essential gcc g++ git python3-dev \
ca-certificates libtbb2-dev && \
ca-certificates libtbb-dev && \
rm -rf /var/lib/apt/lists/*
# Install multilib libc needed to build clang_rt
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017-2024, Intel Corporation
# Copyright (c) 2017-2026, Intel Corporation
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -18,8 +18,9 @@ ARG LTO
# otherwise LLVM build may fail, as it will use all the cores available to container.
# Packages
# Ubuntu 22.04 provides TBB 2021.x (libtbb.so.12) which is compatible with LLVM 21+
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y clang-12 build-essential libnuma1 opencl-headers ocl-icd-libopencl1 clinfo vim gcc g++ git python3-dev imagemagick \
m4 bison flex libc6-dev-i386 cpio lsb-core wget netcat-openbsd libtbb2-dev libglfw3-dev pkgconf gdb gcc-multilib g++-multilib curl ca-certificates ninja-build && \
m4 bison flex libc6-dev-i386 cpio lsb-core wget netcat-openbsd libglfw3-dev pkgconf gdb gcc-multilib g++-multilib curl ca-certificates ninja-build libtbb-dev && \
rm -rf /var/lib/apt/lists/*
# Download and install required version of cmake (3.23.5 for both x86 and aarch64) as required for superbuild preset jsons.
+4 -2
View File
@@ -1,4 +1,4 @@
## Copyright 2023 Intel Corporation
## Copyright 2023-2026 Intel Corporation
## SPDX-License-Identifier: BSD-3-Clause
set(ISPCRT_BUILD_TASK_MODELS "OpenMP;TBB;Threads")
@@ -37,7 +37,9 @@ if (ISPCRT_BUILD_TASKING)
if (TBB_ROOT)
message(STATUS "TBB root:" ${TBB_ROOT})
# Try to find TBB library and header files
find_library(TBB_LIB NAMES libtbb.so.2 tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
# Search in lib/ and lib/intel64/gcc4.8/ for oneAPI TBB compatibility
find_library(TBB_LIB NAMES libtbb.so.2 tbb
PATHS ${TBB_ROOT}/lib ${TBB_ROOT}/lib/intel64/gcc4.8 NO_DEFAULT_PATH)
find_path(TBB_INCLUDE_DIR NAMES ${TBB_HEADER} PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
# If TBB library and header files are found, use them.
if (TBB_LIB AND TBB_INCLUDE_DIR)