Skip to content
Open
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
1 change: 1 addition & 0 deletions .ci/env/tbb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ build_dir=${build_dir:-${ONEDAL_DIR}/__work/tbb-$target_arch}
tbb_prefix=${tbb_prefix:-${ONEDAL_DIR}/__deps/tbb-$target_arch}

sudo apt-get update
sudo apt --fix-broken install -y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alexandr-Solovev What kind of error does this aim to solve? Do you have a log?

Copy link
Copy Markdown
Contributor Author

@Alexandr-Solovev Alexandr-Solovev Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In building tbb step:

Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.9ubuntu3).
build-essential set to manually installed.
gcc is already the newest version (4:11.2.0-1ubuntu1).
gfortran is already the newest version (4:11.2.0-1ubuntu1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cmake : Depends: libjsoncpp25 (>= 1.9.5) but it is not going to be installed
Depends: librhash0 (>= 1.2.6) but it is not going to be installed
Depends: cmake-data (= 3.22.1-1ubuntu1.22.04.2) but it is not going to be installed
qemu-user-binfmt : Breaks: qemu-user-static
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

https://dev.azure.com/daal/DAAL/_build/results?buildId=58377&view=logs&jobId=7fa2fe30-a155-550c-7010-1fb992734fdc&j=7fa2fe30-a155-550c-7010-1fb992734fdc&t=4a793525-59cb-541f-9719-5240f27cc1d9

Copy link
Copy Markdown
Contributor

@david-cortes-intel david-cortes-intel Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the problem might be caused by this:
https://github.com/Alexandr-Solovev/oneDAL/blob/5266602d376f49f80fc1856b2dba1634c93295e1/.ci/env/apt.sh#L83

It shouldn't be manually downloading .deb files from the debian main repository and then installing them with dpkg, since it is running ubuntu.

The ubuntu equivalent would be the qemu-user package.

@Alexandr-Solovev Could you try installing the correct ubuntu package and seeing if that eliminates the need for such workarounds?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that it might require updating to the latest ubuntu. The CI uses 22.04, which probably doesn't have that package.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess, that the reason, that previously we skipped this step for a long time, due to
TBB_CACHE_DIR : $(Pipeline.Workspace)/tbb-riscv64-clang was not empty.
In the main

Image

But I will take a look on your guess today

sudo apt-get install build-essential gcc gfortran cmake -y
Comment on lines 118 to 119
tbb_src=${tbb_src:-${ONEDAL_DIR}/__work/onetbb-src}
if [[ ! -d "${tbb_src}" ]] ; then
Expand Down
4 changes: 2 additions & 2 deletions .ci/pipeline/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pr:

variables:
OPENBLAS_VERSION : 'v0.3.27'
TBB_VERSION : 'v2021.10.0'
TBB_VERSION : 'v2022.3.0'
VM_IMAGE : 'ubuntu-24.04'
WIN_VM_IMAGE : 'windows-2022'
SYSROOT_OS: 'noble'
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
platform.type : 'lnxriscv64'
OPENBLAS_VERSION : 'v0.3.27'
OPENBLAS_CACHE_DIR : $(Pipeline.Workspace)/openblas-riscv64-clang
TBB_VERSION : 'v2021.10.0'
TBB_VERSION : 'v2022.3.0'
TBB_CACHE_DIR : $(Pipeline.Workspace)/tbb-riscv64-clang
SYSROOT_CACHE_DIR: $(Pipeline.Workspace)/sysroot-riscv64
pool:
Expand Down
8 changes: 0 additions & 8 deletions dev/bazel/deps/tbb.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,4 @@ tbb_repo = repos.prebuilt_libs_repo_rule(
"lib/libtbbmalloc.so.2",
],
build_template = "@onedal//dev/bazel/deps:tbb.tpl.BUILD",
# Remove this once support for TBB 2021.11 and older versions is discontinued
local_mapping = {
# Required directory layout and layout in the downloaded
# archives may be different. Mapping helps to setup relations
# between required layout (LHS) and downloaded (RHS).
# In this case, files from `lib/*` will be copied to `lib/intel64/*`.
"lib/": "lib/intel64/gcc4.8/",
},
)
12 changes: 0 additions & 12 deletions dev/bazel/repos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,9 @@ def _download(repo_ctx):
)
return str(output)

# TODO: Delete hardcoded package keywords after release
def _prebuilt_libs_repo_impl(repo_ctx):
root = repo_ctx.os.environ.get(repo_ctx.attr.root_env_var)
if root:
if "2017u1" in root:
mapping = repo_ctx.attr._local_mapping
elif "2023u1" in root:
mapping = repo_ctx.attr._local_mapping
elif "20230413" in root:
mapping = repo_ctx.attr._local_mapping
elif "2021.10.0-RC" in root:
mapping = repo_ctx.attr._local_mapping
elif "2021.2-gold_236" in root:
mapping = repo_ctx.attr._local_mapping
else:
mapping = {}
else:
if repo_ctx.attr.url or repo_ctx.attr.urls:
Expand Down
7 changes: 6 additions & 1 deletion dev/download_tbb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
#===============================================================================

TBB_VERSION="2021.10.0"
TBB_VERSION="2022.3.0"
TBB_URL_ROOT="https://github.com/uxlfoundation/oneTBB/releases/download/v${TBB_VERSION}"

os=$(uname)
Expand Down Expand Up @@ -75,6 +75,11 @@ if [ ! -d "${DST}/${OS}/bin" ]; then
else
echo tar -xvf "${DST}/${TBB_PACKAGE}" -C "${DST}"
tar -C "${DST}/${OS}" --strip-components=1 -xvf "${DST}/${TBB_PACKAGE}"
# Flatten old TBB layout (lib/intel64/gcc4.8/) to new layout (lib/)
if [ -d "${DST}/${OS}/lib/intel64/gcc4.8" ]; then
mv "${DST}/${OS}/lib/intel64/gcc4.8"/* "${DST}/${OS}/lib/"
rm -rf "${DST}/${OS}/lib/intel64"
fi
fi
ls -al "${DST}/${OS}/"
echo "Downloaded and unpacked oneTBB to ${DST}/${OS}"
Expand Down
42 changes: 12 additions & 30 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,31 +239,20 @@ TBBDIR.include := $(if $(TBBDIR.2),$(TBBDIR.2)/include/tbb $(TBBDIR.2)/include)

TBBDIR.libia.prefix := $(TBBDIR.2)/lib

OLD_TBB_LAYOUT := $(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/$(_IA)),yes,no)

ifeq ($(OLD_TBB_LAYOUT),no)
TBBDIR.libia.win.vc1 := $(if $(OS_is_win),$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/vc_mt),$(TBBDIR.libia.prefix)/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/vc14),$(TBBDIR.libia.prefix)/vc14)))
else
TBBDIR.libia.win.vc1 := $(if $(OS_is_win),$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/$(_IA)/vc_mt),$(TBBDIR.libia.prefix)/$(_IA)/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/$(_IA)/vc14),$(TBBDIR.libia.prefix)/$(_IA)/vc14)))
endif
TBBDIR.libia.win.vc1 := $(if $(OS_is_win),$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/vc_mt),$(TBBDIR.libia.prefix)/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.libia.prefix))/vc14),$(TBBDIR.libia.prefix)/vc14)))

TBBDIR.libia.win.vc2 := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc1),,$(firstword $(filter $(call topf,$$TBBROOT)%,$(subst ;,$(space),$(call topf,$$LIB))))))
TBBDIR.libia.win.vc22 := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc2),$(wildcard $(TBBDIR.libia.win.vc2)/tbb12$(dtbb).dll)))

ifeq ($(OLD_TBB_LAYOUT),no)
TBBDIR.libia.win:= $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(TBBDIR.libia.win.vc1),$(TBBDIR.libia.win.vc1),$(error Can`t find TBB libs nether in $(call frompf,$(TBBDIR.libia.prefix))/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).))))
TBBDIR.libia.lnx.gcc1 := $(if $(OS_is_lnx),$(if $(wildcard $(TBBDIR.libia.prefix)/*),$(TBBDIR.libia.prefix)))
else
TBBDIR.libia.win:= $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(TBBDIR.libia.win.vc1),$(TBBDIR.libia.win.vc1),$(error Can`t find TBB libs nether in $(call frompf,$(TBBDIR.libia.prefix))/$(_IA)/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).))))
TBBDIR.libia.lnx.gcc1 := $(if $(OS_is_lnx),$(if $(wildcard $(TBBDIR.libia.prefix)/$(_IA)/gcc4.8/*),$(TBBDIR.libia.prefix)/$(_IA)/gcc4.8))
endif
TBBDIR.libia.win:= $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(TBBDIR.libia.win.vc1),$(TBBDIR.libia.win.vc1),$(error Can`t find TBB libs nether in $(call frompf,$(TBBDIR.libia.prefix))/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).))))
TBBDIR.libia.lnx.gcc1 := $(if $(OS_is_lnx),$(if $(wildcard $(TBBDIR.libia.prefix)/*),$(TBBDIR.libia.prefix)))

TBBDIR.libia.lnx.gcc2 := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc1),,$(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH))))))
TBBDIR.libia.lnx.gcc22 := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc2),$(wildcard $(TBBDIR.libia.lnx.gcc2)/libtbb.so)))
ifeq ($(OLD_TBB_LAYOUT),no)
TBBDIR.libia.lnx := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc22),$(TBBDIR.libia.lnx.gcc2),$(if $(TBBDIR.libia.lnx.gcc1),$(TBBDIR.libia.lnx.gcc1),$(error Can`t find TBB runtimes nether in $(TBBDIR.libia.prefix) not in $(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH)))).))))
else
TBBDIR.libia.lnx := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc22),$(TBBDIR.libia.lnx.gcc2),$(if $(TBBDIR.libia.lnx.gcc1),$(TBBDIR.libia.lnx.gcc1),$(error Can`t find TBB runtimes nether in $(TBBDIR.libia.prefix)/$(_IA)/gcc4.8 not in $(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH)))).))))
endif

TBBDIR.libia.lnx := $(if $(OS_is_lnx),$(if $(TBBDIR.libia.lnx.gcc22),$(TBBDIR.libia.lnx.gcc2),$(if $(TBBDIR.libia.lnx.gcc1),$(TBBDIR.libia.lnx.gcc1),$(error Can`t find TBB runtimes nether in $(TBBDIR.libia.prefix) not in $(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LD_LIBRARY_PATH)))).))))

TBBDIR.libia.mac.clang1 := $(if $(OS_is_mac),$(if $(wildcard $(TBBDIR.libia.prefix)/*),$(TBBDIR.libia.prefix)))
TBBDIR.libia.mac.clang2 := $(if $(OS_is_mac),$(if $(TBBDIR.libia.mac.clang1),,$(firstword $(filter $(TBBROOT)%,$(subst :,$(space),$(LIBRARY_PATH))))))
TBBDIR.libia.mac.clang22 := $(if $(OS_is_mac),$(if $(TBBDIR.libia.mac.clang2),$(wildcard $(TBBDIR.libia.mac.clang2)/libtbb.dylib)))
Expand All @@ -272,23 +261,16 @@ TBBDIR.libia.mac := $(if $(OS_is_mac),$(if $(TBBDIR.libia.mac.clang22),$(TBBDIR.
TBBDIR.libia := $(TBBDIR.libia.$(_OS))

TBBDIR.soia.prefix := $(TBBDIR.2)/
ifeq ($(OLD_TBB_LAYOUT),no)
TBBDIR.soia.win := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(wildcard $(call frompf1,$(TBBDIR.soia.prefix))bin/vc_mt/*),$(TBBDIR.soia.prefix)bin/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.soia.prefix))bin/vc14/*),$(TBBDIR.soia.prefix)bin/vc14,$(error Can`t find TBB runtimes nether in $(TBBDIR.soia.prefix)bin/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).)))))
else
TBBDIR.soia.win := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(wildcard $(call frompf1,$(TBBDIR.soia.prefix))redist/$(_IA)/vc_mt/*),$(TBBDIR.soia.prefix)redist/$(_IA)/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.soia.prefix))redist/$(_IA)/vc14/*),$(TBBDIR.soia.prefix)redist/$(_IA)/vc14,$(error Can`t find TBB runtimes nether in $(TBBDIR.soia.prefix)redist/$(_IA)/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).)))))
endif
TBBDIR.soia.win := $(if $(OS_is_win),$(if $(TBBDIR.libia.win.vc22),$(TBBDIR.libia.win.vc2),$(if $(wildcard $(call frompf1,$(TBBDIR.soia.prefix))bin/vc_mt/*),$(TBBDIR.soia.prefix)bin/vc_mt,$(if $(wildcard $(call frompf1,$(TBBDIR.soia.prefix))bin/vc14/*),$(TBBDIR.soia.prefix)bin/vc14,$(error Can`t find TBB runtimes nether in $(TBBDIR.soia.prefix)bin/vc_mt not in $(firstword $(filter $(TBBROOT)%,$(subst ;,$(space),$(LIB)))).)))))

TBBDIR.soia.lnx := $(if $(OS_is_lnx),$(TBBDIR.libia.lnx))
TBBDIR.soia.mac := $(if $(OS_is_mac),$(TBBDIR.libia.mac))
TBBDIR.soia := $(TBBDIR.soia.$(_OS))

RELEASEDIR.tbb := $(RELEASEDIR)/tbb/latest
ifeq ($(OLD_TBB_LAYOUT),no)
RELEASEDIR.tbb.libia := $(RELEASEDIR.tbb)/lib$(if $(OS_is_mac),,$(if $(OS_is_win),/vc_mt,/$(TBBDIR.libia.lnx.gcc)))
RELEASEDIR.tbb.soia := $(if $(OS_is_win),$(RELEASEDIR.tbb)/bin/vc_mt,$(RELEASEDIR.tbb.libia))
else
RELEASEDIR.tbb.libia := $(RELEASEDIR.tbb)/lib$(if $(OS_is_mac),,/$(_IA)$(if $(OS_is_win),/vc_mt,/$(TBBDIR.libia.lnx.gcc)))
RELEASEDIR.tbb.soia := $(if $(OS_is_win),$(RELEASEDIR.tbb)/redist/$(_IA)/vc_mt,$(RELEASEDIR.tbb.libia))
endif
RELEASEDIR.tbb.libia := $(RELEASEDIR.tbb)/lib$(if $(OS_is_mac),,$(if $(OS_is_win),/vc_mt,/$(TBBDIR.libia.lnx.gcc)))
RELEASEDIR.tbb.soia := $(if $(OS_is_win),$(RELEASEDIR.tbb)/bin/vc_mt,$(RELEASEDIR.tbb.libia))

releasetbb.LIBS_A := $(if $(OS_is_win),$(TBBDIR.libia)/tbb12$(dtbb).$(a) $(TBBDIR.libia)/tbbmalloc$(dtbb).$(a))
releasetbb.LIBS_Y := $(TBBDIR.soia)/$(plib)tbb$(if $(OS_is_win),12$(dtbb),).$(y) $(TBBDIR.soia)/$(plib)tbbmalloc$(dtbb).$(y) \
$(if $(OS_is_lnx), $(if $(wildcard $(TBBDIR.soia)/libtbbmalloc.so.2),$(wildcard $(TBBDIR.soia)/libtbbmalloc.so.2))\
Expand Down
7 changes: 1 addition & 6 deletions samples/daal/cpp/mpi/makefile_lnx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,8 @@ ifndef TBBROOT
TBBROOT = ./../../../../../../tbb/latest
endif

OLD_TBB_LAYOUT := $(if $(wildcard $(TBBROOT)/lib/intel64/),yes,no)
TBB_PATH = "$(TBBROOT)/lib"

ifeq ($(OLD_TBB_LAYOUT),no)
TBB_PATH = "$(TBBROOT)/lib"
else
TBB_PATH = "$(TBBROOT)/lib/intel64/gcc4.8"
endif

DAAL_PATH = "$(DALROOT)/lib/intel64"
DAAL_LIB := $(DAAL_PATH)/libonedal_core.$(RES_EXT) $(DAAL_PATH)/libonedal_thread.$(RES_EXT)
Expand Down
Loading