tbb_2022: 2022.1.0 -> 2022.2.0, clean up, fix macOS; tbb_2021: drop (#442554)

Emily 10a29bad 25c1d672

Changed files
+208 -185
pkgs
applications
misc
prusa-slicer
by-name
au
autotier
ba
bambu-studio
bl
blender
ca
cabinpkg
li
libblake3
libloot
ma
manifold
mo
na
or
orca-slicer
pd
pdf4qt
sa
salmon
sc
scipopt-papilo
scipopt-scip
su
supercell-wx
tb
to
todds
ue
ueberzugpp
development
libraries
embree
top-level
+4 -4
pkgs/applications/misc/prusa-slicer/default.nix
···
opencascade-occt_7_6_1,
openvdb,
qhull,
-
tbb_2021,
wxGTK32,
xorg,
libbgcode,
···
hash = "sha256-WNdAYu66ggpSYJ8Kt57yEA4mSTv+Rvzj9Rm1q765HpY=";
};
});
-
openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021; };
wxGTK-override' = if wxGTK-override == null then wxGTK32 else wxGTK-override;
opencascade-override' =
if opencascade-override == null then opencascade-occt_7_6_1 else opencascade-override;
···
nanosvg-fltk
nlopt
opencascade-override'
-
openvdb_tbb_2021_8
qhull
-
tbb_2021
wxGTK-override'
xorg.libX11
libbgcode
···
opencascade-occt_7_6_1,
openvdb,
qhull,
+
tbb_2022,
wxGTK32,
xorg,
libbgcode,
···
hash = "sha256-WNdAYu66ggpSYJ8Kt57yEA4mSTv+Rvzj9Rm1q765HpY=";
};
});
+
openvdb_tbb_2022 = openvdb.override { tbb = tbb_2022; };
wxGTK-override' = if wxGTK-override == null then wxGTK32 else wxGTK-override;
opencascade-override' =
if opencascade-override == null then opencascade-occt_7_6_1 else opencascade-override;
···
nanosvg-fltk
nlopt
opencascade-override'
+
openvdb_tbb_2022
qhull
+
tbb_2022
wxGTK-override'
xorg.libX11
libbgcode
+2 -2
pkgs/by-name/au/autotier/package.nix
···
boost,
fuse3,
lib45d,
-
tbb_2021,
liburing,
installShellFiles,
}:
···
boost
fuse3
lib45d
-
tbb_2021
liburing
];
···
boost,
fuse3,
lib45d,
+
tbb_2022,
liburing,
installShellFiles,
}:
···
boost
fuse3
lib45d
+
tbb_2022
liburing
];
+2 -2
pkgs/by-name/ba/bambu-studio/package.nix
···
opencv,
pcre,
systemd,
-
tbb_2021,
webkitgtk_4_1,
wxGTK31,
xorg,
···
opencascade-occt_7_6
openvdb
pcre
-
tbb_2021
webkitgtk_4_1
wxGTK'
xorg.libX11
···
opencv,
pcre,
systemd,
+
tbb_2022,
webkitgtk_4_1,
wxGTK31,
xorg,
···
opencascade-occt_7_6
openvdb
pcre
+
tbb_2022
webkitgtk_4_1
wxGTK'
xorg.libX11
+1 -1
pkgs/by-name/bl/blender/package.nix
···
libsndfile
libtiff
libwebp
-
(manifold.override { tbb_2021 = tbb; })
opencolorio
openexr
openimageio
···
libsndfile
libtiff
libwebp
+
manifold
opencolorio
openexr
openimageio
+2 -2
pkgs/by-name/ca/cabinpkg/package.nix
···
lib,
stdenv,
fetchFromGitHub,
-
tbb_2021,
libgit2,
curl,
fmt,
···
buildInputs = [
libgit2
fmt
-
tbb_2021
nlohmann_json
curl
];
···
lib,
stdenv,
fetchFromGitHub,
+
tbb_2022,
libgit2,
curl,
fmt,
···
buildInputs = [
libgit2
fmt
+
tbb_2022
nlohmann_json
curl
];
+2 -3
pkgs/by-name/li/libblake3/package.nix
···
cmake,
fetchFromGitHub,
fetchpatch,
-
tbb_2021,
useTBB ? true,
}:
···
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = lib.optionals useTBB [
-
# 2022.0 crashes on macOS at the moment
-
tbb_2021
];
cmakeFlags = [
···
cmake,
fetchFromGitHub,
fetchpatch,
+
tbb_2022,
useTBB ? true,
}:
···
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = lib.optionals useTBB [
+
tbb_2022
];
cmakeFlags = [
+2 -2
pkgs/by-name/li/libloot/package.nix
···
gtest,
icu,
spdlog,
-
tbb_2021,
yaml-cpp,
}:
···
gtest
icu
(spdlog.override { fmt = fmt_11; })
-
tbb_2021
finalAttrs.passthru.yaml-cpp # has merge-key support
finalAttrs.passthru.libloadorder
···
gtest,
icu,
spdlog,
+
tbb_2022,
yaml-cpp,
}:
···
gtest
icu
(spdlog.override { fmt = fmt_11; })
+
tbb_2022
finalAttrs.passthru.yaml-cpp # has merge-key support
finalAttrs.passthru.libloadorder
+3 -3
pkgs/by-name/ma/manifold/package.nix
···
clipper2,
gtest,
glm,
-
tbb_2021,
python3Packages,
}:
···
buildInputs = [
gtest
glm
-
tbb_2021
];
propagatedBuildInputs = [ clipper2 ];
···
'';
passthru = {
-
tbb = tbb_2021;
tests = {
python = python3Packages.manifold3d;
};
···
clipper2,
gtest,
glm,
+
tbb_2022,
python3Packages,
}:
···
buildInputs = [
gtest
glm
+
tbb_2022
];
propagatedBuildInputs = [ clipper2 ];
···
'';
passthru = {
+
tbb = tbb_2022;
tests = {
python = python3Packages.manifold3d;
};
-1
pkgs/by-name/mo/mold/package.nix
···
changelog = "https://github.com/rui314/mold/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
-
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "mold";
maintainers = with lib.maintainers; [ azahi ];
};
···
changelog = "https://github.com/rui314/mold/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
mainProgram = "mold";
maintainers = with lib.maintainers; [ azahi ];
};
+2 -2
pkgs/by-name/na/naja/package.nix
···
pkg-config,
python3,
sphinx,
-
tbb_2021,
buildPackages,
nix-update-script,
}:
···
boost
capnproto # cmake modules
flex # include dir
-
tbb_2021
python3
];
···
pkg-config,
python3,
sphinx,
+
tbb_2022,
buildPackages,
nix-update-script,
}:
···
boost
capnproto # cmake modules
flex # include dir
+
tbb_2022
python3
];
+2 -2
pkgs/by-name/or/orca-slicer/package.nix
···
opencv,
pcre,
systemd,
-
tbb_2021,
webkitgtk_4_1,
wxGTK31,
xorg,
···
opencascade-occt_7_6
openvdb
pcre
-
tbb_2021
webkitgtk_4_1
wxGTK'
xorg.libX11
···
opencv,
pcre,
systemd,
+
tbb_2022,
webkitgtk_4_1,
wxGTK31,
xorg,
···
opencascade-occt_7_6
openvdb
pcre
+
tbb_2022
webkitgtk_4_1
wxGTK'
xorg.libX11
+2 -2
pkgs/by-name/pd/pdf4qt/package.nix
···
qt6,
wrapGAppsHook3,
openjpeg,
-
tbb_2021,
blend2d,
}:
···
qt6.qtspeech
lcms
openjpeg
-
tbb_2021
blend2d
];
···
qt6,
wrapGAppsHook3,
openjpeg,
+
tbb_2022,
blend2d,
}:
···
qt6.qtspeech
lcms
openjpeg
+
tbb_2022
blend2d
];
+2 -2
pkgs/by-name/sa/salmon/package.nix
···
libiconv,
libstaden-read,
pkg-config,
-
tbb_2021,
xz,
zlib,
}:
···
jemalloc
libgff
libstaden-read
-
tbb_2021
xz
zlib
]
···
libiconv,
libstaden-read,
pkg-config,
+
tbb_2022,
xz,
zlib,
}:
···
jemalloc
libgff
libstaden-read
+
tbb_2022
xz
zlib
]
+2 -2
pkgs/by-name/sc/scipopt-papilo/package.nix
···
boost,
blas,
gmp,
-
tbb_2021,
gfortran,
}:
···
gmp
gfortran
boost
-
tbb_2021
];
cmakeFlags = [
···
boost,
blas,
gmp,
+
tbb_2022,
gfortran,
}:
···
gmp
gfortran
boost
+
tbb_2022
];
cmakeFlags = [
+2 -2
pkgs/by-name/sc/scipopt-scip/package.nix
···
scipopt-papilo,
scipopt-zimpl,
ipopt,
-
tbb_2021,
boost,
gfortran,
criterion,
···
gmp
readline
zlib
-
tbb_2021
boost
gfortran
criterion
···
scipopt-papilo,
scipopt-zimpl,
ipopt,
+
tbb_2022,
boost,
gfortran,
criterion,
···
gmp
readline
zlib
+
tbb_2022
boost
gfortran
criterion
+2 -2
pkgs/by-name/su/supercell-wx/package.nix
···
gtest,
glm,
qt6,
-
tbb_2021,
tracy,
replaceVars,
python3,
···
aws-sdk-cpp
howard-hinnant-date
boost
-
tbb_2021
glew
geos
spdlog
···
gtest,
glm,
qt6,
+
tbb_2022,
tracy,
replaceVars,
python3,
···
aws-sdk-cpp
howard-hinnant-date
boost
+
tbb_2022
glew
geos
spdlog
-103
pkgs/by-name/tb/tbb_2021/package.nix
···
-
{
-
lib,
-
stdenv,
-
fetchFromGitHub,
-
fetchpatch,
-
cmake,
-
ninja,
-
}:
-
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "tbb";
-
version = "2021.12.0";
-
-
outputs = [
-
"out"
-
"dev"
-
];
-
-
src = fetchFromGitHub {
-
owner = "oneapi-src";
-
repo = "oneTBB";
-
tag = "v${finalAttrs.version}";
-
hash = "sha256-yG/Fs+3f9hNKzZ8le+W7+JDZk9hMzPsVAzbq0yTcUTc=";
-
};
-
-
nativeBuildInputs = [
-
cmake
-
ninja
-
];
-
-
patches = [
-
# Fix musl build from https://github.com/oneapi-src/oneTBB/pull/899
-
(fetchpatch {
-
url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch";
-
hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU=";
-
})
-
# Fix tests on FreeBSD and Windows
-
(fetchpatch {
-
name = "fix-tbb-freebsd-and-windows-tests.patch";
-
url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch";
-
hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4=";
-
})
-
# Fix 32-bit PowerPC build
-
(fetchpatch {
-
url = "https://github.com/uxlfoundation/oneTBB/pull/987/commits/c828ae47b8f4bea7736d2f9d05460e2b529c9d7d.patch";
-
hash = "sha256-faNiVdHRIkmavufDHQQ8vHppvdahZ7yhJVL3bOwNTFg=";
-
})
-
];
-
-
patchFlags = [
-
"-p1"
-
"--ignore-whitespace"
-
];
-
-
# Fix build with modern gcc
-
# In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
-
NIX_CFLAGS_COMPILE =
-
lib.optionals stdenv.cc.isGNU [
-
"-Wno-error=array-bounds"
-
"-Wno-error=stringop-overflow"
-
]
-
++
-
# error: variable 'val' set but not used
-
lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ]
-
++
-
# Workaround for gcc-12 ICE when using -O3
-
# https://gcc.gnu.org/PR108854
-
lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isx86_32) [ "-O2" ];
-
-
# Fix undefined reference errors with version script under LLVM.
-
NIX_LDFLAGS = lib.optionalString (
-
stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"
-
) "--undefined-version";
-
-
# Disable failing test on musl
-
# test/conformance/conformance_resumable_tasks.cpp:37:24: error: ‘suspend’ is not a member of ‘tbb::v1::task’; did you mean ‘tbb::detail::r1::suspend’?
-
postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
-
substituteInPlace test/CMakeLists.txt \
-
--replace-fail 'tbb_add_test(SUBDIR conformance NAME conformance_resumable_tasks DEPENDENCIES TBB::tbb)' ""
-
'';
-
-
enableParallelBuilding = true;
-
-
meta = {
-
description = "Intel Thread Building Blocks C++ Library";
-
homepage = "http://threadingbuildingblocks.org/";
-
license = lib.licenses.asl20;
-
longDescription = ''
-
Intel Threading Building Blocks offers a rich and complete approach to
-
expressing parallelism in a C++ program. It is a library that helps you
-
take advantage of multi-core processor performance without having to be a
-
threading expert. Intel TBB is not just a threads-replacement library. It
-
represents a higher-level, task-based parallelism that abstracts platform
-
details and threading mechanisms for scalability and performance.
-
'';
-
platforms = lib.platforms.all;
-
maintainers = with lib.maintainers; [
-
silvanshade
-
thoughtpolice
-
tmarkus
-
];
-
};
-
})
···
+38
pkgs/by-name/tb/tbb_2022/fix-32-bit-powerpc-build.patch
···
···
+
From c828ae47b8f4bea7736d2f9d05460e2b529c9d7d Mon Sep 17 00:00:00 2001
+
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+
Date: Fri, 9 Dec 2022 12:36:11 +0100
+
Subject: [PATCH] Add cmake check for libatomic requirement when building with
+
gcc (#980)
+
+
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+
---
+
cmake/compilers/GNU.cmake | 16 ++++++++++++++++
+
1 file changed, 16 insertions(+)
+
+
diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
+
index cd76acfe1e..59f4e6934f 100644
+
--- a/cmake/compilers/GNU.cmake
+
+++ b/cmake/compilers/GNU.cmake
+
@@ -44,6 +44,22 @@ if (NOT MINGW)
+
set(TBB_COMMON_LINK_LIBS dl)
+
endif()
+
+
+# Check whether code with full atomics can be built without libatomic
+
+# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
+
+include(CheckCXXSourceCompiles)
+
+check_cxx_source_compiles("#include <atomic>
+
+int main() {
+
+ std::atomic<uint8_t> w1;
+
+ std::atomic<uint16_t> w2;
+
+ std::atomic<uint32_t> w4;
+
+ std::atomic<uint64_t> w8;
+
+ return ++w1 + ++w2 + ++w4 + ++w8;
+
+}" TBB_BUILDS_WITHOUT_LIBATOMIC)
+
+
+
+if(NOT TBB_BUILDS_WITHOUT_LIBATOMIC)
+
+ set(TBB_COMMON_LINK_LIBS ${TBB_COMMON_LINK_LIBS} atomic)
+
+endif()
+
+
+
# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
+
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
+
tbb_remove_compile_flag(-Werror)
+69
pkgs/by-name/tb/tbb_2022/fix-libtbbmalloc-dlopen.patch
···
···
+
From 791d42ddacad829d19a4f66b77dc9ca410008db9 Mon Sep 17 00:00:00 2001
+
From: Emily <hello@emily.moe>
+
Date: Sat, 13 Sep 2025 03:16:16 +0100
+
Subject: [PATCH] Use `dladdr` to keep `libtbbmalloc` loaded on POSIX
+
+
This fixes issues that arise when `libtbbmalloc` cannot be loaded by
+
relative path, makes the behaviour consistent with the Windows code
+
path, and eliminates the duplication of `MALLOCLIB_NAME`.
+
---
+
src/tbbmalloc/tbbmalloc.cpp | 34 +++++++++-------------------------
+
1 file changed, 9 insertions(+), 25 deletions(-)
+
+
diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp
+
index b72e03a74f..12d62445aa 100644
+
--- a/src/tbbmalloc/tbbmalloc.cpp
+
+++ b/src/tbbmalloc/tbbmalloc.cpp
+
@@ -1,5 +1,5 @@
+
/*
+
- Copyright (c) 2005-2023 Intel Corporation
+
+ Copyright (c) 2005-2025 Intel Corporation
+
+
Licensed under the Apache License, Version 2.0 (the "License");
+
you may not use this file except in compliance with the License.
+
@@ -32,25 +32,6 @@
+
namespace rml {
+
namespace internal {
+
+
-#if TBB_USE_DEBUG
+
-#define DEBUG_SUFFIX "_debug"
+
-#else
+
-#define DEBUG_SUFFIX
+
-#endif /* TBB_USE_DEBUG */
+
-
+
-// MALLOCLIB_NAME is the name of the oneTBB memory allocator library.
+
-#if _WIN32||_WIN64
+
-#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll"
+
-#elif __APPLE__
+
-#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".2.dylib"
+
-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__
+
-#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so"
+
-#elif __unix__
+
-#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.2)
+
-#else
+
-#error Unknown OS
+
-#endif
+
-
+
void init_tbbmalloc() {
+
#if __TBB_USE_ITT_NOTIFY
+
MallocInitializeITT();
+
@@ -92,11 +73,14 @@ struct RegisterProcessShutdownNotification {
+
RegisterProcessShutdownNotification() {
+
// prevents unloading, POSIX case
+
+
- // We need better support for the library pinning
+
- // when dlopen can't find TBBmalloc library.
+
- // for example: void *ret = dlopen(MALLOCLIB_NAME, RTLD_NOW);
+
- // MALLOC_ASSERT(ret, "Allocator can't load itself.");
+
- dlopen(MALLOCLIB_NAME, RTLD_NOW);
+
+ Dl_info dlinfo;
+
+ int ret = dladdr((void*)&init_tbbmalloc, &dlinfo);
+
+ MALLOC_ASSERT(ret && dlinfo.dli_fname, "Allocator can't find itself.");
+
+ tbb::detail::suppress_unused_warning(ret);
+
+
+
+ void* lib = dlopen(dlinfo.dli_fname, RTLD_NOW);
+
+ MALLOC_ASSERT(lib, "Allocator can't load itself.");
+
+ tbb::detail::suppress_unused_warning(lib);
+
}
+
+
RegisterProcessShutdownNotification(RegisterProcessShutdownNotification&) = delete;
+24
pkgs/by-name/tb/tbb_2022/fix-musl-build.patch
···
···
+
From 493774eb57f9c424fc8907d137665e687861ad94 Mon Sep 17 00:00:00 2001
+
From: Ismael Luceno <ismael@iodev.co.uk>
+
Date: Fri, 9 Sep 2022 16:18:18 +0200
+
Subject: [PATCH] Fix build against musl libc
+
+
Probably MALLOC_UNIXLIKE_OVERLOAD_ENABLED only works with glibc, so use
+
__GLIBC__ in addition to __linux__ to define it.
+
---
+
src/tbbmalloc_proxy/proxy.h | 2 +-
+
1 file changed, 1 insertion(+), 1 deletion(-)
+
+
diff --git a/src/tbbmalloc_proxy/proxy.h b/src/tbbmalloc_proxy/proxy.h
+
index 5f0133f9e0..ba1a07c396 100644
+
--- a/src/tbbmalloc_proxy/proxy.h
+
+++ b/src/tbbmalloc_proxy/proxy.h
+
@@ -17,7 +17,7 @@
+
#ifndef _TBB_malloc_proxy_H_
+
#define _TBB_malloc_proxy_H_
+
+
-#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__
+
+#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED (__linux__ && __GLIBC__)
+
#define MALLOC_ZONE_OVERLOAD_ENABLED __APPLE__
+
+
// MALLOC_UNIXLIKE_OVERLOAD_ENABLED depends on MALLOC_CHECK_RECURSION stuff
+36 -40
pkgs/by-name/tb/tbb_2022/package.nix
···
lib,
stdenv,
fetchFromGitHub,
-
fetchpatch,
cmake,
ninja,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tbb";
-
version = "2022.1.0";
outputs = [
"out"
···
owner = "oneapi-src";
repo = "oneTBB";
tag = "v${finalAttrs.version}";
-
hash = "sha256-DqJkNlC94cPJSXnhyFcEqWYGCQPunMfIfb05UcFGynw=";
};
nativeBuildInputs = [
cmake
ninja
];
-
patches = [
-
# Fix musl build from https://github.com/oneapi-src/oneTBB/pull/899
-
(fetchpatch {
-
url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch";
-
hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU=";
-
})
-
# Fix tests on FreeBSD and Windows
-
(fetchpatch {
-
name = "fix-tbb-freebsd-and-windows-tests.patch";
-
url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch";
-
hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4=";
-
})
-
# Fix 32-bit PowerPC build
-
(fetchpatch {
-
url = "https://github.com/uxlfoundation/oneTBB/pull/987/commits/c828ae47b8f4bea7736d2f9d05460e2b529c9d7d.patch";
-
hash = "sha256-faNiVdHRIkmavufDHQQ8vHppvdahZ7yhJVL3bOwNTFg=";
-
})
-
];
-
# Fix build with modern gcc
-
# In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
-
NIX_CFLAGS_COMPILE =
-
lib.optionals stdenv.cc.isGNU [
-
"-Wno-error=array-bounds"
-
"-Wno-error=stringop-overflow"
-
]
-
++
-
# error: variable 'val' set but not used
-
lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ]
-
++
-
# Workaround for gcc-12 ICE when using -O3
-
# https://gcc.gnu.org/PR108854
-
lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isx86_32) [ "-O2" ];
-
# Fix undefined reference errors with version script under LLVM.
-
NIX_LDFLAGS = lib.optionalString (
-
stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"
-
) "--undefined-version";
# Disable failing test on musl
# test/conformance/conformance_resumable_tasks.cpp:37:24: error: ‘suspend’ is not a member of ‘tbb::v1::task’; did you mean ‘tbb::detail::r1::suspend’?
···
--replace-fail 'tbb_add_test(SUBDIR conformance NAME conformance_resumable_tasks DEPENDENCIES TBB::tbb)' ""
'';
-
enableParallelBuilding = true;
meta = {
description = "Intel Thread Building Blocks C++ Library";
···
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
+
ctestCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tbb";
+
version = "2022.2.0";
outputs = [
"out"
···
owner = "oneapi-src";
repo = "oneTBB";
tag = "v${finalAttrs.version}";
+
hash = "sha256-ASQPAGm5e4q7imvTVWlmj5ON4fGEao1L5m2C5wF7EhI=";
};
+
patches = [
+
# <https://github.com/uxlfoundation/oneTBB/pull/899>
+
./fix-musl-build.patch
+
+
# <https://github.com/uxlfoundation/oneTBB/pull/987>
+
./fix-32-bit-powerpc-build.patch
+
+
# Fix an assumption that `libtbbmalloc` can pass a relative path to
+
# `dlopen(3)` to find itself. This caused mysterious crashes on
+
# macOS, where we do not use run paths by default.
+
#
+
# <https://github.com/uxlfoundation/oneTBB/pull/1849>
+
./fix-libtbbmalloc-dlopen.patch
+
];
+
nativeBuildInputs = [
cmake
ninja
+
ctestCheckHook
];
+
doCheck = true;
+
dontUseNinjaCheck = true;
+
# The memory leak test fails on static Linux, despite passing on
+
# dynamic Musl.
+
disabledTests = lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [
+
"test_arena_constraints"
+
];
# Disable failing test on musl
# test/conformance/conformance_resumable_tasks.cpp:37:24: error: ‘suspend’ is not a member of ‘tbb::v1::task’; did you mean ‘tbb::detail::r1::suspend’?
···
--replace-fail 'tbb_add_test(SUBDIR conformance NAME conformance_resumable_tasks DEPENDENCIES TBB::tbb)' ""
'';
+
env = {
+
# Fix build with modern gcc
+
# In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
+
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=stringop-overflow";
+
+
# Fix undefined reference errors with version script under LLVM.
+
NIX_LDFLAGS = lib.optionalString (
+
stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"
+
) "--undefined-version";
+
};
meta = {
description = "Intel Thread Building Blocks C++ Library";
+2 -2
pkgs/by-name/to/todds/package.nix
···
fmt,
hyperscan,
opencv,
-
tbb_2021,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
···
fmt
hyperscan
opencv
-
tbb_2021
];
strictDeps = true;
···
fmt,
hyperscan,
opencv,
+
tbb_2022,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
···
fmt
hyperscan
opencv
+
tbb_2022
];
strictDeps = true;
+2 -2
pkgs/by-name/ue/ueberzugpp/package.nix
···
openssl,
zeromq,
cppzmq,
-
tbb_2021,
spdlog,
libsodium,
fmt,
···
openssl
zeromq
cppzmq
-
tbb_2021
spdlog
libsodium
fmt
···
openssl,
zeromq,
cppzmq,
+
tbb_2022,
spdlog,
libsodium,
fmt,
···
openssl
zeromq
cppzmq
+
tbb_2022
spdlog
libsodium
fmt
+1 -1
pkgs/development/libraries/embree/2.x.nix
···
];
buildInputs = [
ispc
-
# tbb_2021 is not backward compatible
tbb_2020
glfw
openimageio
···
];
buildInputs = [
ispc
+
# tbb_2022 is not backward compatible
tbb_2020
glfw
openimageio
+1
pkgs/top-level/aliases.nix
···
taplo-lsp = taplo; # Added 2022-07-30
targetcli = targetcli-fb; # Added 2025-03-14
taro = taproot-assets; # Added 2023-07-04
tcl-fcgi = tclPackages.tcl-fcgi; # Added 2024-10-02
tclcurl = tclPackages.tclcurl; # Added 2024-10-02
tcllib = tclPackages.tcllib; # Added 2024-10-02
···
taplo-lsp = taplo; # Added 2022-07-30
targetcli = targetcli-fb; # Added 2025-03-14
taro = taproot-assets; # Added 2023-07-04
+
tbb_2021 = throw "tbb_2021 has been removed because it is unmaintained upstream and had no remaining users; use tbb_2022"; # Added 2025-09-13
tcl-fcgi = tclPackages.tcl-fcgi; # Added 2024-10-02
tclcurl = tclPackages.tclcurl; # Added 2024-10-02
tcllib = tclPackages.tcllib; # Added 2024-10-02
+3 -3
pkgs/top-level/all-packages.nix
···
cve = with python3Packages; toPythonApplication cvelib;
basalt-monado = callPackage ../by-name/ba/basalt-monado/package.nix {
-
tbb = tbb_2021;
cereal = cereal_1_3_2;
opencv = opencv.override { enableGtk3 = true; };
};
···
ikos = callPackage ../development/tools/analysis/ikos {
inherit (llvmPackages_14) stdenv clang llvm;
-
tbb = tbb_2021;
};
include-what-you-use = callPackage ../development/tools/analysis/include-what-you-use {
···
cctag = callPackage ../development/libraries/cctag {
stdenv = clangStdenv;
-
tbb = tbb_2021;
};
ceedling = callPackage ../development/tools/ceedling { };
···
cve = with python3Packages; toPythonApplication cvelib;
basalt-monado = callPackage ../by-name/ba/basalt-monado/package.nix {
+
tbb = tbb_2022;
cereal = cereal_1_3_2;
opencv = opencv.override { enableGtk3 = true; };
};
···
ikos = callPackage ../development/tools/analysis/ikos {
inherit (llvmPackages_14) stdenv clang llvm;
+
tbb = tbb_2022;
};
include-what-you-use = callPackage ../development/tools/analysis/include-what-you-use {
···
cctag = callPackage ../development/libraries/cctag {
stdenv = clangStdenv;
+
tbb = tbb_2022;
};
ceedling = callPackage ../development/tools/ceedling { };